summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt42
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")