| 1 | # Sources |
| 2 | set(libt2n_SOURCES |
| 3 | client.cpp |
| 4 | client_wrapper.cpp |
| 5 | command.cpp |
| 6 | command_client.cpp |
| 7 | command_server.cpp |
| 8 | connection.cpp |
| 9 | container.cpp |
| 10 | server.cpp |
| 11 | socket_client.cpp |
| 12 | socket_handler.cpp |
| 13 | socket_server.cpp |
| 14 | socket_wrapper.cpp |
| 15 | t2n_exception.cpp |
| 16 | ) |
| 17 | set(libt2n_HEADERS |
| 18 | client.hxx |
| 19 | client_wrapper.hxx |
| 20 | command.hxx |
| 21 | command_client.hxx |
| 22 | command_server.hxx |
| 23 | connection.hxx |
| 24 | container.hxx |
| 25 | log.hxx |
| 26 | server.hxx |
| 27 | socket_client.hxx |
| 28 | socket_handler.hxx |
| 29 | socket_server.hxx |
| 30 | socket_wrapper.hxx |
| 31 | t2n_exception.hxx |
| 32 | types.hxx |
| 33 | container.tcc |
| 34 | t2n_exception.tcc |
| 35 | ) |
| 36 | include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}) |
| 37 | |
| 38 | # Libraries |
| 39 | add_library(libt2n SHARED ${libt2n_SOURCES} ${libt2n_HEADERS}) |
| 40 | set_target_properties(libt2n PROPERTIES VERSION ${VERSION} SOVERSION 1) |
| 41 | set_target_properties(libt2n PROPERTIES OUTPUT_NAME t2n) |
| 42 | set_target_properties(libt2n PROPERTIES CLEAN_DIRECT_OUTPUT 1) |
| 43 | |
| 44 | add_library(libt2n-static STATIC ${libt2n_SOURCES} ${libt2n_HEADERS}) |
| 45 | set_target_properties(libt2n-static PROPERTIES OUTPUT_NAME t2n) |
| 46 | set_target_properties(libt2n-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) |
| 47 | |
| 48 | # Installation |
| 49 | install(FILES ${libt2n_HEADERS} DESTINATION include) |
| 50 | install(TARGETS libt2n LIBRARY DESTINATION lib) |
| 51 | install(TARGETS libt2n-static ARCHIVE DESTINATION lib) |