Hashing functions based upon openssl created
[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    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
32 SET(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
63 add_library(i2ncommon SHARED ${cpp_sources} ${cpp_headers})
64
65 target_link_libraries(i2ncommon
66                       ${Boost_IOSTREAMS_LIBRARIES}
67                       ${Boost_THREAD_LIBRARIES}
68                       ${ICONV_LIBRARIES}
69                       ${OPENSSL_LIBRARIES})
70
71 set_target_properties(i2ncommon PROPERTIES VERSION ${VERSION} SOVERSION 7)
72 set_target_properties(i2ncommon PROPERTIES OUTPUT_NAME i2ncommon CLEAN_DIRECT_OUTPUT 1)
73
74 add_library(i2ncommon_static STATIC ${cpp_sources} ${cpp_headers})
75 set_target_properties(i2ncommon_static PROPERTIES OUTPUT_NAME i2ncommon CLEAN_DIRECT_OUTPUT 1)
76
77 install(TARGETS i2ncommon
78         LIBRARY DESTINATION lib${LIB_SUFFIX}
79         COMPONENT sharedlibs)
80
81 install(TARGETS i2ncommon_static
82         ARCHIVE DESTINATION lib${LIB_SUFFIX}
83         COMPONENT staticlibs)
84
85 install(FILES ${cpp_headers}
86         DESTINATION include/${PROJECT_NAME}
87         COMPONENT headers)