CMake: Use CCMAKE_INSTALL_PREFIX as default to set directory install
@@ -10,10 +10,6 @@ option(CGLM_STATIC "Static build" OFF)
option(CGLM_USE_C99 "" OFF)
option(CGLM_USE_TEST "Enable Tests" OFF)
-option(CGLM_INSTALL_PATH "")
-option(CGLM_INSTALL_LIBDIR "")
-option(CGLM_INSTALL_INCDIR "")
-
if(NOT CGLM_STATIC AND CGLM_SHARED)
set(CGLM_BUILD SHARED)
else(CGLM_STATIC)
@@ -168,22 +164,11 @@ if(LDFLAGS)
target_compile_options(cglm PRIVATE ${LDFLAGS})
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")
-endif()
-
install(
TARGETS cglm
EXPORT cglm
- ARCHIVE DESTINATION ${CGLM_INSTALL_LIBDIR} COMPONENT development
- LIBRARY DESTINATION ${CGLM_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_SKIP
+ ARCHIVE DESTINATION lib/ COMPONENT development
+ LIBRARY DESTINATION lib/ COMPONENT runtime NAMELINK_SKIP
RUNTIME DESTINATION ${CMAKE_INSTALL_NAME_DIR} COMPONENT runtime
)
@@ -191,16 +176,12 @@ if(CGLM_SHARED)
install(
TARGETS cglm
EXPORT cglm
- LIBRARY DESTINATION ${CGLM_INSTALL_LIBDIR} COMPONENT development NAMELINK_ONLY
+ LIBRARY DESTINATION include/ COMPONENT development NAMELINK_ONLY
)
endif()
-INSTALL(DIRECTORY include/ DESTINATION ${CGLM_INSTALL_INCDIR}
- COMPONENT development
- FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- # PATTERN "cglm/*"
- )
+INSTALL(DIRECTORY include/ DESTINATION include)
# Test Configuration
if(CGLM_USE_TEST)
