From: Kevron Rees Date: Wed, 11 Nov 2015 21:43:46 +0000 (-0800) Subject: cmake: use cmake includedir X-Git-Tag: v0.9.0~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7a405a531a89fc8c91a56555e346248ed109862;hp=063a3154aaa3f9d1eba4cd610b2869e7fba01d45;p=contrib%2Fmraa.git 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 Signed-off-by: Brendan Le Foll --- 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)