diff options
Diffstat (limited to 'pcitool/CMakeLists.txt')
-rw-r--r-- | pcitool/CMakeLists.txt | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/pcitool/CMakeLists.txt b/pcitool/CMakeLists.txt index 6dc7942..1b21041 100644 --- a/pcitool/CMakeLists.txt +++ b/pcitool/CMakeLists.txt @@ -1,8 +1,32 @@ include_directories( ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/pcilib + ${FASTWRITER_INCLUDE_DIRS} ) -set(HEADERS ${HEADERS} sysinfo.h formaters.h) +link_directories( + ${FASTWRITER_LIBRARY_DIRS} + ${CMAKE_SOURCE_DIR}/pcilib +) + +if (NOT DISABLE_PCITOOL) + add_executable(pci cli.c sysinfo.c formaters.c) + set(HEADERS ${HEADERS} sysinfo.h formaters.h) + add_dependencies(pci pcitool) + target_link_libraries(pci pcilib ${FASTWRITER_LIBRARIES}) + set_target_properties(pci PROPERTIES + LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT} + ) + +#set_target_properties(pci PROPERTIES +# LINK_FLAGS "-Wl,pcitool/libpcitool.a" +#) -add_library(pcitool STATIC sysinfo.c formaters.c) + if(NOT DEFINED BIN_INSTALL_DIR) + set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") + endif(NOT DEFINED BIN_INSTALL_DIR) + install(TARGETS pci + DESTINATION ${BIN_INSTALL_DIR} + ) +endif (NOT DISABLE_PCITOOL) |