Merge pull request #871 from ffontaine/master
CMakeLists: add BUILD_{SHARED,STATIC}_LIBS options #871
This commit is contained in:
commit
a40bd4d01c
@ -12,6 +12,8 @@ include(CMakePackageConfigHelpers)
|
||||
enable_testing()
|
||||
|
||||
option(GLM_QUIET "No CMake Message" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared library" ON)
|
||||
option(BUILD_STATIC_LIBS "Build static library" ON)
|
||||
option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
|
||||
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
|
||||
option(GLM_TEST_ENABLE_CXX_14 "Enable C++ 14" OFF)
|
||||
|
@ -44,6 +44,7 @@ source_group("SIMD Files" FILES ${SIMD_HEADER})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
|
||||
if(BUILD_STATIC_LIBS)
|
||||
add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
|
||||
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
|
||||
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
|
||||
@ -51,7 +52,9 @@ add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
|
||||
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
|
||||
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}
|
||||
${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER})
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_library(glm_shared SHARED ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
|
||||
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
|
||||
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
|
||||
@ -59,4 +62,5 @@ add_library(glm_shared SHARED ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
|
||||
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
|
||||
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}
|
||||
${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER})
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user