diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-13 15:10:25 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-13 15:10:25 +0100 |
commit | 76c0e81b168506ab602049b151693d8aee3c932a (patch) | |
tree | ba4b1703816e5a25553c5a2bb0b561aac28c797d | |
parent | 258fc6e84ec0d8b5597c1b0ba1f37d8b20a01297 (diff) | |
download | ipecamera-76c0e81b168506ab602049b151693d8aee3c932a.tar.gz ipecamera-76c0e81b168506ab602049b151693d8aee3c932a.tar.bz2 ipecamera-76c0e81b168506ab602049b151693d8aee3c932a.tar.xz ipecamera-76c0e81b168506ab602049b151693d8aee3c932a.zip |
Add install targets to cmake
-rw-r--r-- | .bzrignore | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | ipecamera/CMakeLists.txt | 3 |
3 files changed, 23 insertions, 1 deletions
@@ -17,3 +17,4 @@ CMakeFiles cmake_install.cmake Makefile *.so.* +install_manifest.txt 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 +) diff --git a/ipecamera/CMakeLists.txt b/ipecamera/CMakeLists.txt index 029993c..87699fa 100644 --- a/ipecamera/CMakeLists.txt +++ b/ipecamera/CMakeLists.txt @@ -6,3 +6,6 @@ set(HEADERS ${HEADERS} ipecamera.h model.h reader.h events.h data.h public.h pri add_library(ipecamera STATIC ipecamera.c model.c reader.c events.c data.c) +install(FILES ipecamera.h + DESTINATION include +) |