diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-09-01 17:05:38 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-09-01 17:05:38 +0200 |
commit | 4535ac71e075946f374aef0bb1e2997869f148fe (patch) | |
tree | 7439eea8c02b5164ef459f5b7a7565a1d0c3f42c /CMakeLists.txt | |
parent | 6bad94bb8546a3a5595d340e7a2d809635e3bd5d (diff) | |
download | pcitool-4535ac71e075946f374aef0bb1e2997869f148fe.tar.gz pcitool-4535ac71e075946f374aef0bb1e2997869f148fe.tar.bz2 pcitool-4535ac71e075946f374aef0bb1e2997869f148fe.tar.xz pcitool-4535ac71e075946f374aef0bb1e2997869f148fe.zip |
Fixes out-of-source builds and minor build issues
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b6fce9a..6e62519 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,28 @@ set(DISABLE_PCITOOL FALSE CACHE BOOL "Build only the library") #list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +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 "${CMAKE_INSTALL_PREFIX}/lib") +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) + +if(NOT DEFINED DATA_INSTALL_DIR) + set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share") +endif(NOT DEFINED DATA_INSTALL_DIR) + +if(NOT DEFINED LOCALE_INSTALL_DIR) + set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale") +endif(NOT DEFINED LOCALE_INSTALL_DIR) + +SET(ENV{PKG_CONFIG_PATH} "${LIB_INSTALL_DIR}/pkgconfig:$ENV{PKG_CONFIG_PATH}") + find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED) @@ -45,26 +67,6 @@ set(PACKAGE_TARNAME "${TARNAME}") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket") -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 "${CMAKE_INSTALL_PREFIX}/lib") -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) - -if(NOT DEFINED DATA_INSTALL_DIR) - set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share") -endif(NOT DEFINED DATA_INSTALL_DIR) - -if(NOT DEFINED LOCALE_INSTALL_DIR) - set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale") -endif(NOT DEFINED LOCALE_INSTALL_DIR) - set(PCILIB_PLUGIN_DIR "${LIB_INSTALL_DIR}/pcilib" CACHE PATH "Directory to install plugins") set(PCILIB_DATA_DIR "${DATA_INSTALL_DIR}/pcilib" CACHE PATH "Directory to install data files") set(PCILIB_MODEL_DIR "${PCILIB_DATA_DIR}/models" CACHE PATH "Directory to install XML models") |