mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Simplify setting of GLFW_STANDALONE CMake variable
Use string(COMPARE EQUAL ...) instead of a whole if() statement. Related to #2256
This commit is contained in:
+1
-3
@@ -12,9 +12,7 @@ endif()
|
|||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} GLFW_STANDALONE)
|
||||||
set(GLFW_STANDALONE TRUE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||||
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ${GLFW_STANDALONE})
|
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ${GLFW_STANDALONE})
|
||||||
|
|||||||
Reference in New Issue
Block a user