| 1 | include_directories(${CMAKE_SOURCE_DIR}/src) |
| 2 | |
| 3 | set(cpp_sources |
| 4 | i2n_global_config.cpp |
| 5 | ) |
| 6 | |
| 7 | set(cpp_headers |
| 8 | i2n_global_config.hpp |
| 9 | ) |
| 10 | |
| 11 | add_library(i2ncommon_config SHARED ${cpp_sources} ${cpp_headers}) |
| 12 | set_target_properties(i2ncommon_config PROPERTIES VERSION ${VERSION} SOVERSION 3) |
| 13 | set_target_properties(i2ncommon_config PROPERTIES OUTPUT_NAME i2ncommon_config CLEAN_DIRECT_OUTPUT 1) |
| 14 | |
| 15 | add_library(i2ncommon_config_static STATIC ${cpp_sources} ${cpp_headers}) |
| 16 | set_target_properties(i2ncommon_config_static PROPERTIES OUTPUT_NAME i2ncommon_config CLEAN_DIRECT_OUTPUT 1) |
| 17 | |
| 18 | install(TARGETS i2ncommon_config |
| 19 | LIBRARY DESTINATION lib${LIB_SUFFIX} |
| 20 | COMPONENT sharedlibs) |
| 21 | |
| 22 | install(TARGETS i2ncommon_config_static |
| 23 | ARCHIVE DESTINATION lib${LIB_SUFFIX} |
| 24 | COMPONENT staticlibs) |
| 25 | |
| 26 | install(FILES ${cpp_headers} |
| 27 | DESTINATION include/${PROJECT_NAME} |
| 28 | COMPONENT headers) |