Browse Source

Merge pull request #21 from ibara/master

Don't automatically hardcode CMAKE_INSTALL_PREFIX.
Dalton Nell 10 years ago
parent
commit
7f0f83396a
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      CMakeLists.txt

+ 4
- 2
CMakeLists.txt View File

6
 set( slop_VERSION_PATCH 15 )
6
 set( slop_VERSION_PATCH 15 )
7
 
7
 
8
 set( BIN_TARGET     "${PROJECT_NAME}" )
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
 if( NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
13
 if( NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE )
12
    set( CMAKE_BUILD_TYPE RelWithDebInfo )
14
    set( CMAKE_BUILD_TYPE RelWithDebInfo )
117
 endif()
119
 endif()
118
 
120
 
119
 install( TARGETS ${BIN_TARGET}
121
 install( TARGETS ${BIN_TARGET}
120
-         DESTINATION  ${CMAKE_INSTALL_PREFIX} )
122
+         DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )