diff options
author | Kevron Rees <kevron.m.rees@intel.com> | 2015-11-11 13:43:46 -0800 |
---|---|---|
committer | Brendan Le Foll <brendan.le.foll@intel.com> | 2015-12-01 15:07:36 +0000 |
commit | c7a405a531a89fc8c91a56555e346248ed109862 (patch) | |
tree | 20725d0630c1c22ba6269997ea094f74af441db7 | |
parent | 063a3154aaa3f9d1eba4cd610b2869e7fba01d45 (diff) |
cmake: use cmake includedir
We need to use CMake variables to avoid installing things in the wrong places on
systems that have multilib enabled.
Signed-off-by: Kevron Rees <kevron.m.rees@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
-rw-r--r-- | examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index de29ff3..5ca1431 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -35,7 +35,7 @@ target_link_libraries (spi_max7219 mraa) add_subdirectory (c++) -install (DIRECTORY ${PROJECT_SOURCE_DIR}/examples/ DESTINATION share/mraa/examples) +install (DIRECTORY ${PROJECT_SOURCE_DIR}/examples/ DESTINATION ${CMAKE_INSTALL_DATADIR}/mraa/examples) if (INSTALLGPIOTOOL) install (TARGETS mraa-gpio DESTINATION bin) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f4cd73..8859183 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -93,8 +93,8 @@ set_target_properties( SOVERSION ${mraa_VERSION_MAJOR} VERSION ${mraa_VERSION_STRING} ) -install (FILES ${mraa_LIB_GLOB_HEADERS} DESTINATION include/) -install (DIRECTORY ${PROJECT_SOURCE_DIR}/api/mraa/ DESTINATION include/mraa) +install (FILES ${mraa_LIB_GLOB_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install (DIRECTORY ${PROJECT_SOURCE_DIR}/api/mraa/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mraa) macro (mraa_CREATE_INSTALL_PKGCONFIG generated_file install_location) configure_file (${generated_file}.cmake ${CMAKE_CURRENT_BINARY_DIR}/${generated_file} @ONLY) |