e9fe7062c14abaf5ceee65715a2c6a42c9ab1574
[libi2ncommon] / src / CMakeLists.txt
1 include_directories(
2     ${CMAKE_SOURCE_DIR}/src
3     ${CMAKE_SOURCE_DIR}/utils
4     ${ICONV_INCLUDE_DIRS}
5 )
6
7 SET(cpp_sources
8    cron.cpp
9    daemonfunc.cpp
10    filefunc.cpp
11    i18n.cpp
12    i2n_configfile.cpp
13    ipfunc.cpp
14    logfunc.cpp
15    logread.cpp
16    oftmpstream.cpp
17    pidfile.cpp
18    pipestream.cpp
19    pointer_func.cpp
20    source_track_basics.cpp
21    stringfunc.cpp
22    timefunc.cpp
23    tmpfstream.cpp
24    tracefunc.cpp
25    tribool.cpp
26    userfunc.cpp
27    week.cpp
28 )
29
30 SET(cpp_headers
31     cron.hpp
32     daemonfunc.hpp
33     exception.hxx
34     filefunc.hxx
35     i18n.h
36     i2n_configdata.hpp
37     i2n_configfile.hpp
38     insocketstream.hxx
39     ip_type.hxx
40     ipfunc.hxx
41     log_macros.hpp
42     logfunc.hpp
43     logread.hxx
44     oftmpstream.hxx
45     pidfile.hpp
46     pipestream.hxx
47     pointer_func.hpp
48     source_track_basics.hpp
49     stringfunc.hxx
50     timefunc.hxx
51     tmpfstream.hpp
52     tmpfstream_impl.hpp
53     tracefunc.hpp
54     tribool.hpp
55     userfunc.hpp
56     week.hpp
57 )
58
59 add_library(i2ncommon SHARED ${cpp_sources} ${cpp_headers})
60
61 target_link_libraries(i2ncommon
62                       ${Boost_IOSTREAMS_LIBRARIES}
63                       ${Boost_THREAD_LIBRARIES}
64                       ${ICONV_LIBRARIES}
65                       ${OPENSSL_LIBRARIES})
66
67 set_target_properties(i2ncommon PROPERTIES VERSION ${VERSION} SOVERSION 6)
68
69 install(TARGETS i2ncommon
70         LIBRARY DESTINATION lib${LIB_SUFFIX}
71         COMPONENT sharedlibs)
72
73 install(FILES ${cpp_headers}
74         DESTINATION include/${PROJECT_NAME}
75         COMPONENT headers)