From: John F. Fay Date: Tue, 10 Jan 2012 02:01:19 +0000 (+0000) Subject: Making the building of demo programs optional, but enabled by default per e-mail... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=6b640a617ff8c8bb6a112494d2f659c48b3692e9;p=freeglut Making the building of demo programs optional, but enabled by default per e-mail from Paul Martz dated 1/9/12 at 8:56 AM git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@974 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 12cc9ff..c25947c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,10 +93,15 @@ INSTALL(TARGETS freeglut DESTINATION lib) INSTALL(DIRECTORY "${CMAKE_SOURCE_DIR}/include/GL" DESTINATION include FILES_MATCHING PATTERN "*.h") +# Optionally build demos, on by default. +option( FREEGLUT_BUILD_DEMOS "Build FreeGLUT demos." ON ) + MACRO(ADD_DEMO name) - ADD_EXECUTABLE(${name} ${ARGN}) - TARGET_LINK_LIBRARIES(${name} freeglut) - INSTALL(TARGETS ${name} DESTINATION bin) + if( FREEGLUT_BUILD_DEMOS ) + ADD_EXECUTABLE(${name} ${ARGN}) + TARGET_LINK_LIBRARIES(${name} freeglut) + INSTALL(TARGETS ${name} DESTINATION bin) + endif() ENDMACRO() ADD_DEMO(CallbackMaker progs/demos/CallbackMaker/CallbackMaker.c)