Sfoglia il codice sorgente

Merge pull request #21 from ibara/master

Don't automatically hardcode CMAKE_INSTALL_PREFIX.
Dalton Nell 10 anni fa
parent
commit
7f0f83396a
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4
    2
      CMakeLists.txt

+ 4
- 2
CMakeLists.txt Vedi File

@@ -6,7 +6,9 @@ set( slop_VERSION_MINOR 1 )
6 6
 set( slop_VERSION_PATCH 15 )
7 7
 
8 8
 set( BIN_TARGET     "${PROJECT_NAME}" )
9
-set( CMAKE_INSTALL_PREFIX "/usr/bin" )
9
+if( NOT CMAKE_INSTALL_PREFIX )
10
+   set( CMAKE_INSTALL_PREFIX "/usr" )
11
+endif()
10 12
 
11 13
 if( NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
12 14
    set( CMAKE_BUILD_TYPE RelWithDebInfo )
@@ -117,4 +119,4 @@ else()
117 119
 endif()
118 120
 
119 121
 install( TARGETS ${BIN_TARGET}
120
-         DESTINATION  ${CMAKE_INSTALL_PREFIX} )
122
+         DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )