blob: 836d98fa508f7a14e6ba0072a91c7b371e57d052 [file] [log] [blame] [edit]
--- glbinding-2.1.2/CMakeLists.txt.orig 2017-04-11 18:34:50.000000000 +0300
+++ glbinding-2.1.2/CMakeLists.txt 2017-04-29 00:15:26.332037500 +0300
@@ -115,16 +115,13 @@
set(project ${META_PROJECT_NAME})
# Check for system dir install
-set(SYSTEM_DIR_INSTALL FALSE)
-if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
- set(SYSTEM_DIR_INSTALL TRUE)
-endif()
+option(SYSTEM_DIR_INSTALL "Install in system directory" FALSE)
# Installation paths
-if(UNIX AND SYSTEM_DIR_INSTALL)
+if((UNIX OR MINGW) AND SYSTEM_DIR_INSTALL)
# Install into the system (/usr/bin or /usr/local/bin)
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
+ set(INSTALL_CMAKE "lib/cmake/${project}")
set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project>
set(INSTALL_BIN "bin") # /usr/[local]/bin
@@ -180,15 +177,15 @@
#
# Install version file
-install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
+install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_DOC} COMPONENT runtime)
# Install cmake find script for the project
-install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev)
+install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_CMAKE} COMPONENT dev)
# Install the project meta files
-install(FILES AUTHORS DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
-install(FILES LICENSE DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
-install(FILES README.md DESTINATION ${INSTALL_ROOT} COMPONENT runtime)
+install(FILES AUTHORS DESTINATION ${INSTALL_DOC} COMPONENT runtime)
+install(FILES LICENSE DESTINATION ${INSTALL_DOC} COMPONENT runtime)
+install(FILES README.md DESTINATION ${INSTALL_DOC} COMPONENT runtime)
# Install runtime data
if (TARGET cubescape OR TARGET cubescape-log OR TARGET cubescape-qt)