From 76c0e81b168506ab602049b151693d8aee3c932a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 13 Dec 2011 15:10:25 +0100 Subject: Add install targets to cmake --- CMakeLists.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'CMakeLists.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 +) -- cgit v1.2.3