Clean up CMake project, added arithmetic operators to swizzle operators types
This commit is contained in:
@@ -11,21 +11,6 @@ include(CMakePackageConfigHelpers)
|
||||
|
||||
enable_testing()
|
||||
|
||||
option(GLM_STATIC_LIBRARY_ENABLE "GLM static library" OFF)
|
||||
if(GLM_STATIC_LIBRARY_ENABLE)
|
||||
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_STATIC_LIBRARY_ENABLE with ON to build an optional static library")
|
||||
endif()
|
||||
|
||||
option(GLM_DYNAMIC_LIBRARY_ENABLE "GLM dynamic library" OFF)
|
||||
if(GLM_DYNAMIC_LIBRARY_ENABLE)
|
||||
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_DYNAMIC_LIBRARY_ENABLE with ON to build an optional dynamic library")
|
||||
endif()
|
||||
|
||||
option(GLM_TEST_ENABLE "GLM test" OFF)
|
||||
if(NOT GLM_TEST_ENABLE)
|
||||
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
|
||||
endif()
|
||||
|
||||
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)
|
||||
@@ -177,12 +162,8 @@ include_directories("${PROJECT_SOURCE_DIR}")
|
||||
add_subdirectory(glm)
|
||||
add_subdirectory(test)
|
||||
|
||||
option(GLM_INSTALL_ENABLE "GLM install" ON)
|
||||
|
||||
set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
|
||||
if (GLM_INSTALL_ENABLE)
|
||||
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
endif()
|
||||
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion)
|
||||
|
||||
@@ -197,12 +178,10 @@ configure_package_config_file(
|
||||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
|
||||
if(GLM_INSTALL_ENABLE)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
||||
DESTINATION ${GLM_INSTALL_CONFIGDIR})
|
||||
endif()
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
||||
DESTINATION ${GLM_INSTALL_CONFIGDIR})
|
||||
|
||||
add_library(glm INTERFACE)
|
||||
target_include_directories(glm INTERFACE
|
||||
@@ -212,17 +191,13 @@ install(TARGETS glm EXPORT glmTargets)
|
||||
|
||||
export(EXPORT glmTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake")
|
||||
|
||||
if(GLM_INSTALL_ENABLE)
|
||||
install(EXPORT glmTargets FILE glmTargets.cmake DESTINATION ${GLM_INSTALL_CONFIGDIR})
|
||||
endif()
|
||||
install(EXPORT glmTargets FILE glmTargets.cmake DESTINATION ${GLM_INSTALL_CONFIGDIR})
|
||||
|
||||
# build pkg-config file
|
||||
configure_file("./cmake/glm.pc.in" "glm.pc" @ONLY)
|
||||
|
||||
# install pkg-config file
|
||||
if (GLM_INSTALL_ENABLE)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
endif()
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
export(PACKAGE glm)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user