include_directories( ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/utils ${ICONV_INCLUDE_DIRS} ) SET(cpp_sources cron.cpp crypto.cpp daemonfunc.cpp filefunc.cpp i18n.cpp i2n_configfile.cpp ipfunc.cpp logfunc.cpp logread.cpp oftmpstream.cpp pidfile.cpp pipestream.cpp pointer_func.cpp restricted_html.cpp source_track_basics.cpp stringfunc.cpp timefunc.cpp tmpfstream.cpp tracefunc.cpp tribool.cpp userfunc.cpp week.cpp ) SET(cpp_headers cron.hpp crypto.hxx daemonfunc.hpp exception.hxx filefunc.hxx i18n.h i2n_configdata.hpp i2n_configfile.hpp insocketstream.hxx ip_type.hxx ipfunc.hxx log_macros.hpp logfunc.hpp logread.hxx oftmpstream.hxx pidfile.hpp pipestream.hxx pointer_func.hpp restricted_html.hpp source_track_basics.hpp stringfunc.hxx timefunc.hxx tmpfstream.hpp tmpfstream_impl.hpp tracefunc.hpp tribool.hpp userfunc.hpp week.hpp ) add_library(i2ncommon SHARED ${cpp_sources} ${cpp_headers}) target_link_libraries(i2ncommon ${Boost_IOSTREAMS_LIBRARIES} ${Boost_THREAD_LIBRARIES} ${ICONV_LIBRARIES} ${OPENSSL_LIBRARIES} ${PCRECPP_LIBRARIES}) set_target_properties(i2ncommon PROPERTIES VERSION ${VERSION} SOVERSION 7) set_target_properties(i2ncommon PROPERTIES OUTPUT_NAME i2ncommon CLEAN_DIRECT_OUTPUT 1) add_library(i2ncommon_static STATIC ${cpp_sources} ${cpp_headers}) set_target_properties(i2ncommon_static PROPERTIES OUTPUT_NAME i2ncommon CLEAN_DIRECT_OUTPUT 1) install(TARGETS i2ncommon LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT sharedlibs) install(TARGETS i2ncommon_static ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT staticlibs) install(FILES ${cpp_headers} DESTINATION include/${PROJECT_NAME} COMPONENT headers)