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: https://svn.code.sf.net/p/freeglut/code/trunk@974 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
49a72751ed
commit
f4e9f3aa31
@ -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)
|
||||
|
Reference in New Issue
Block a user