summaryrefslogtreecommitdiffstats
path: root/libk8055/CMakeLists.txt
blob: 708ee96af771126d33fefd9f7e02d81d87302c15 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

ADD_LIBRARY( k8055 SHARED libk8055.c )
ADD_LIBRARY( k8055-static STATIC libk8055.c )
INCLUDE_DIRECTORIES(
    ${CMAKE_SOURCE_DIR}
    ${LIBUSB_INCLUDE_DIR}
)
TARGET_LINK_LIBRARIES( k8055
    ${LIBUSB_LDFLAGS}
    m
)
SET_TARGET_PROPERTIES(k8055 PROPERTIES PUBLIC_HEADER k8055.h )
SET_TARGET_PROPERTIES(k8055 PROPERTIES VERSION ${VERSION} SOVERSION ${VERSION_MAJOR})

INSTALL(TARGETS k8055
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib
    PUBLIC_HEADER DESTINATION include
)

ADD_LIBRARY( k8055++ SHARED libk8055.cpp )
ADD_DEPENDENCIES(k8055++ k8055)
ADD_LIBRARY( k8055++-static STATIC libk8055.cpp )
ADD_DEPENDENCIES(k8055++-static k8055)
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
TARGET_LINK_LIBRARIES( k8055++
    k8055
)
SET_TARGET_PROPERTIES(k8055++ PROPERTIES PUBLIC_HEADER k8055++.h )
SET_TARGET_PROPERTIES(k8055++ PROPERTIES VERSION ${VERSION} SOVERSION ${VERSION_MAJOR})

INSTALL(TARGETS k8055++
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib
    PUBLIC_HEADER DESTINATION include
)

ADD_EXECUTABLE(k8055cmd WIN32 MACOSX_BUNDLE main.c )
TARGET_LINK_LIBRARIES(k8055cmd
    k8055
)
ADD_DEPENDENCIES(k8055cmd k8055)

CONFIGURE_FILE(k8055.pc.in k8055.pc @ONLY)

INSTALL(TARGETS k8055cmd RUNTIME DESTINATION bin BUNDLE DESTINATION bin )

INSTALL(FILES k8055cmd.1.gz DESTINATION man/man1/ )

INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/k8055.pc DESTINATION lib/pkgconfig )