diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-03-16 20:06:45 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-03-16 20:06:45 +0100 |
commit | 6fa5eb9906e9d5f47abd3f704bfe3604171c58ab (patch) | |
tree | 98e3ac7e6cec2d73c2a492e6eb3005433b6a0df7 /CMakeLists.txt | |
parent | da2be2cf6bff18aaf01b90257a5b6edf04e2cebc (diff) | |
download | ipecamera-6fa5eb9906e9d5f47abd3f704bfe3604171c58ab.tar.gz ipecamera-6fa5eb9906e9d5f47abd3f704bfe3604171c58ab.tar.bz2 ipecamera-6fa5eb9906e9d5f47abd3f704bfe3604171c58ab.tar.xz ipecamera-6fa5eb9906e9d5f47abd3f704bfe3604171c58ab.zip |
Use GNUInstallDirs
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 053ae3f..352d4f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ exec_program("pkg-config --variable=plugindir pcitool" OUTPUT_VARIABLE PCILIB_PL include(cmake/version.cmake) VERSION_TO_VARS(${IPECAMERA_VERSION} IPECAMERA_VERSION_MAJOR IPECAMERA_VERSION_MINOR IPECAMERA_VERSION_MICRO) +include(GNUInstallDirs) add_subdirectory(apps) @@ -40,7 +41,7 @@ add_library(ipecamera SHARED model.c cmosis.c base.c reader.c events.c data.c en target_link_libraries(ipecamera ${PCILIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${UFODECODE_LIBRARIES} ) install(FILES ipecamera.h - DESTINATION include + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install(TARGETS ipecamera @@ -69,23 +70,11 @@ add_custom_target(dist_clean COMMAND ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTO add_custom_target(dist DEPENDS dist_clean COMMAND ${CMAKE_MAKE_PROGRAM} package_source) -if(NOT DEFINED BIN_INSTALL_DIR) - set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") -endif(NOT DEFINED BIN_INSTALL_DIR) - -if(NOT DEFINED LIB_INSTALL_DIR) - set(LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") -endif(NOT DEFINED LIB_INSTALL_DIR) - -if(NOT DEFINED INCLUDE_INSTALL_DIR) - set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") -endif(NOT DEFINED INCLUDE_INSTALL_DIR) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ipecamera.pc.in ${CMAKE_CURRENT_BINARY_DIR}/ipecamera.pc) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ipecamera.spec.in ${CMAKE_CURRENT_BINARY_DIR}/ipecamera.spec) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ipecamera.pc - DESTINATION ${LIB_INSTALL_DIR}/pkgconfig + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) |