INSTALL(DIRECTORY "${CMAKE_SOURCE_DIR}/include/GL" DESTINATION include\r
FILES_MATCHING PATTERN "*.h")\r
\r
+# Optionally build demos, on by default.\r
+option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON )\r
+\r
MACRO(ADD_DEMO name)\r
- ADD_EXECUTABLE(${name} ${ARGN})\r
- TARGET_LINK_LIBRARIES(${name} freeglut)\r
- INSTALL(TARGETS ${name} DESTINATION bin)\r
+ if( FREEGLUT_BUILD_DEMOS )\r
+ ADD_EXECUTABLE(${name} ${ARGN})\r
+ TARGET_LINK_LIBRARIES(${name} freeglut)\r
+ INSTALL(TARGETS ${name} DESTINATION bin)\r
+ endif()\r
ENDMACRO()\r
\r
ADD_DEMO(CallbackMaker progs/demos/CallbackMaker/CallbackMaker.c)\r