diff --git a/CMakeLists.txt b/CMakeLists.txt index 49c50ed..74de7b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,16 +55,17 @@ endif() # Configuration Options # ------------------------------------------------------------------ option(GPRT_BUILD_SHARED "Build GPRT as a shared library? (otherwise static)" OFF) -set(BUILD_SHARED_LIBS ${GPRT_BUILD_SHARED}) # use 'GPRT_' naming convention option(GPRT_USE_INCLUDED_GLFW "Build GPRT including the submoduled GLFW? (otherwise, system GLFW will be found)" ON) # ------------------------------------------------------------------ # External configuration variables # ------------------------------------------------------------------ -# provide these varaibles at both a local and parent scope +# provide these variables at both a local and parent scope if (GPRT_IS_SUBPROJECT) set(GPRT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gprt PARENT_SCOPE) +else() + set(BUILD_SHARED_LIBS ${GPRT_BUILD_SHARED}) endif() set(GPRT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gprt)