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