summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-13 15:10:25 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-13 15:10:25 +0100
commit76c0e81b168506ab602049b151693d8aee3c932a (patch)
treeba4b1703816e5a25553c5a2bb0b561aac28c797d /CMakeLists.txt
parent258fc6e84ec0d8b5597c1b0ba1f37d8b20a01297 (diff)
downloadipecamera-76c0e81b168506ab602049b151693d8aee3c932a.tar.gz
ipecamera-76c0e81b168506ab602049b151693d8aee3c932a.tar.bz2
ipecamera-76c0e81b168506ab602049b151693d8aee3c932a.tar.xz
ipecamera-76c0e81b168506ab602049b151693d8aee3c932a.zip
Add install targets to cmake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 19 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7664481..40d7396 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@ find_package(PkgConfig REQUIRED)
#Check in sibling directory
pkg_check_modules(UFODECODE ufodecode REQUIRED)
+pkg_check_modules(FASTWRITER fastwriter REQUIRED)
set(HEADERS pcilib.h pci.h register.h kmem.h irq.h dma.h event.h default.h tools.h error.h)
add_definitions("-fPIC --std=c99 -Wall -O2 -pthread")
@@ -18,7 +19,7 @@ add_subdirectory(ipecamera)
add_subdirectory(pcitool)
add_library(pcilib SHARED pci.c register.c kmem.c irq.c dma.c event.c default.c tools.c error.c)
-target_link_libraries(pcilib ufodecode dma ipecamera)
+target_link_libraries(pcilib ufodecode fastwriter dma ipecamera)
add_dependencies(pcilib dma ipecamera)
set_target_properties(pcilib PROPERTIES
@@ -36,3 +37,20 @@ target_link_libraries(pci pcilib pcitool)
# LINK_FLAGS "-Wl,pcitool/libpcitool.a"
#)
+
+if(NOT DEFINED BIN_INSTALL_DIR)
+ set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+endif(NOT DEFINED BIN_INSTALL_DIR)
+
+
+install(TARGETS pcilib
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+)
+
+install(TARGETS pci
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+install(FILES pcilib.h
+ DESTINATION include
+)