Added CMake options to disable building of examples and/or tests.

master
Camilla Berglund ago%!(EXTRA string=14 years)
parent 638702a3d9
commit b11681a3ab
  1. 9
      CMakeLists.txt

@ -10,6 +10,9 @@ set(GLFW_VERSION_EXTRA "")
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}")
set(GLFW_VERSION_FULL "${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA}")
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
include(CheckFunctionExists)
include(CheckSymbolExists)
@ -122,8 +125,14 @@ endif(UNIX AND APPLE)
# Add subdirectories
#--------------------------------------------------------------------
add_subdirectory(src)
if (GLFW_BUILD_EXAMPLES)
add_subdirectory(examples)
endif(GLFW_BUILD_EXAMPLES)
if (GLFW_BUILD_TESTS)
add_subdirectory(tests)
endif(GLFW_BUILD_TESTS)
#--------------------------------------------------------------------
# Create shared configuration header

Loading…
Cancel
Save