/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2015-04-24 03:35:48 UTC
  • Revision ID: csa@suren.me-20150424033548-7xhacqq2s8s1t2fp
More structural changes to get ready for stand-alone event engines

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    pkg_check_modules(FASTWRITER fastwriter REQUIRED)
17
17
endif (NOT DISABLE_PCITOOL)
18
18
 
19
 
set(HEADERS pcilib.h pci.h config.h model.h bank.h register.h kmem.h irq.h dma.h event.h tools.h error.h)
20
19
add_definitions("-fPIC --std=c99 -Wall -O2 -gdwarf-2 -g3")
21
20
#add_definitions("-fPIC --std=c99 -Wall -O2")
22
21
 
23
22
add_subdirectory(dma)
24
23
add_subdirectory(protocols)
 
24
add_subdirectory(pcilib)
25
25
add_subdirectory(pcitool)
26
26
add_subdirectory(apps)
27
27
 
28
 
include_directories(
29
 
    .
30
 
    ${FASTWRITER_INCLUDE_DIRS}
31
 
)
32
 
 
33
 
link_directories(
34
 
    ${FASTWRITER_LIBRARY_DIRS}
35
 
    ${UFODECODE_LIBRARY_DIRS}
36
 
)
37
 
 
38
 
add_library(pcilib SHARED pci.c config.c model.c bank.c register.c kmem.c irq.c dma.c event.c tools.c error.c) 
39
 
target_link_libraries(pcilib dma protocols ${CMAKE_THREAD_LIBS_INIT} ${UFODECODE_LIBRARIES} )
40
 
add_dependencies(pcilib dma protocols pcitool)
41
 
 
42
28
set_target_properties(pcilib PROPERTIES
43
29
    VERSION ${PCILIB_VERSION}
44
30
    SOVERSION ${PCILIB_ABI_VERSION}
45
31
)
46
32
 
47
 
if (NOT DISABLE_PCITOOL)
48
 
    add_executable(pci cli.c)
49
 
    add_dependencies(pci pcitool)
50
 
    target_link_libraries(pci pcilib pcitool ${FASTWRITER_LIBRARIES})
51
 
    set_target_properties(pci PROPERTIES
52
 
        LINK_FLAGS ${CMAKE_THREAD_LIBS_INIT}
53
 
    )
54
 
endif (NOT DISABLE_PCITOOL)
55
 
 
56
 
#set_target_properties(pci PROPERTIES
57
 
#    LINK_FLAGS "-Wl,pcitool/libpcitool.a"
58
 
#)
59
 
 
60
 
if(NOT DEFINED BIN_INSTALL_DIR)
61
 
    set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
62
 
endif(NOT DEFINED BIN_INSTALL_DIR)
63
 
 
64
 
 
65
 
install(TARGETS pcilib
66
 
    LIBRARY DESTINATION lib${LIB_SUFFIX}
67
 
)
68
 
 
69
 
if (NOT DISABLE_PCITOOL)
70
 
    install(TARGETS pci
71
 
        DESTINATION ${BIN_INSTALL_DIR}
72
 
    )
73
 
endif (NOT DISABLE_PCITOOL)
74
 
 
75
 
install(FILES pcilib.h
76
 
    DESTINATION include
77
 
)
78
 
 
79
 
install(FILES bank.h register.h dma.h event.h model.h error.h tools.h
80
 
    DESTINATION include/pcilib
81
 
)
 
33
 
 
34
 
 
35