summaryrefslogtreecommitdiffstats
path: root/pcitool/CMakeLists.txt
blob: 4aea14226a240b4a31ece3d80f31348b381ded37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
include_directories(
    ${CMAKE_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/pcilib
    ${FASTWRITER_INCLUDE_DIRS}
)

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 pcilib)
    target_link_libraries(pci pcilib ${FASTWRITER_LIBRARIES})
    set_target_properties(pci PROPERTIES
	LINK_FLAGS "${CMAKE_THREAD_LIBS_INIT} ${EXTRA_SYSTEM_LIBS}"
    )

#set_target_properties(pci PROPERTIES
#    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 pci
	DESTINATION ${BIN_INSTALL_DIR}
    )
endif (NOT DISABLE_PCITOOL)