diff options
Diffstat (limited to 'core/CMakeLists.txt')
-rw-r--r-- | core/CMakeLists.txt | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index abd15807..49ca7c83 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt | |||
@@ -13,14 +13,27 @@ set(core_sources | |||
13 | ping.c | 13 | ping.c |
14 | tox.c) | 14 | tox.c) |
15 | 15 | ||
16 | if(SHARED_TOXCORE) | 16 | set(core_headers |
17 | add_library(toxcore SHARED ${core_sources}) | 17 | DHT.h |
18 | else() | 18 | network.h |
19 | add_library(toxcore ${core_sources}) | 19 | Lossless_UDP.h |
20 | endif() | 20 | net_crypto.h |
21 | friend_requests.h | ||
22 | LAN_discovery.h | ||
23 | Messenger.h | ||
24 | util.h | ||
25 | ping.h) | ||
26 | |||
27 | add_library(toxcore SHARED ${core_sources}) | ||
28 | add_library(toxcore_static ${core_sources}) | ||
29 | set_target_properties(toxcore_static PROPERTIES OUTPUT_NAME toxcore) | ||
21 | 30 | ||
22 | target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) | 31 | target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) |
23 | 32 | ||
33 | install(TARGETS toxcore toxcore_static DESTINATION lib) | ||
34 | install(FILES ${core_headers} DESTINATION include) | ||
35 | |||
24 | if(WIN32) | 36 | if(WIN32) |
25 | target_link_libraries(toxcore ws2_32) | 37 | target_link_libraries(toxcore ws2_32) |
26 | endif() | 38 | endif() |
39 | |||