CMake: add lib and include install path
@@ -153,12 +153,18 @@ endif()
if(NOT CGLM_INSTALL_PATH)
set(CGLM_INSTALL_PATH "")
endif()
+if(NOT CGLM_INSTALL_LIBDIR)
+ set(CGLM_INSTALL_LIBDIR "${CGLM_INSTALL_PATH}lib")
+endif()
+if(NOT CGLM_INSTALL_INCDIR )
+ set(CGLM_INSTALL_INCDIR "${CGLM_INSTALL_PATH}include/clgm")
+endif()
install(
TARGETS cglm
EXPORT cglm
- ARCHIVE DESTINATION ${CGLM_INSTALL_PATH}lib COMPONENT development
- LIBRARY DESTINATION ${CGLM_INSTALL_PATH}lib COMPONENT runtime NAMELINK_SKIP
+ ARCHIVE DESTINATION ${CGLM_INSTALL_LIBDIR} COMPONENT development
+ LIBRARY DESTINATION ${CGLM_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_SKIP
RUNTIME DESTINATION ${CMAKE_INSTALL_NAME_DIR} COMPONENT runtime
)
@@ -166,12 +172,12 @@ if(CGLM_SHARED)
install(
TARGETS cglm
EXPORT cglm
- LIBRARY DESTINATION ${CGLM_INSTALL_PATH}/lib COMPONENT development NAMELINK_ONLY
+ LIBRARY DESTINATION ${CGLM_INSTALL_LIBDIR} COMPONENT development NAMELINK_ONLY
)
endif()
-install(FILES ${HEADERS} DESTINATION ${CGLM_INSTALL_PATH}include/cglm COMPONENT development)
+install(FILES ${HEADERS} DESTINATION ${CGLM_INSTALL_INCDIR} COMPONENT development)
# Test Configuration
if(CGLM_USE_TEST)
