diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/CMakeLists.txt | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index c7016a49..eacb772c 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt | |||
@@ -1,12 +1,6 @@ | |||
1 | cmake_minimum_required(VERSION 2.6.0) | 1 | cmake_minimum_required(VERSION 2.6.0) |
2 | project(toxcore C) | 2 | project(toxcore C) |
3 | 3 | ||
4 | if(WIN32) | ||
5 | include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/) | ||
6 | else(WIN32) | ||
7 | include_directories(${SODIUM_INCLUDE_DIR}) | ||
8 | endif() | ||
9 | |||
10 | set(core_sources | 4 | set(core_sources |
11 | DHT.c | 5 | DHT.c |
12 | network.c | 6 | network.c |
@@ -16,8 +10,13 @@ set(core_sources | |||
16 | LAN_discovery.c | 10 | LAN_discovery.c |
17 | Messenger.c) | 11 | Messenger.c) |
18 | 12 | ||
19 | add_library(toxcore SHARED ${core_sources}) | 13 | if(SHARED_TOXCORE) |
20 | target_link_libraries(toxcore ${SODIUM_LIBRARY}) | 14 | add_library(toxcore SHARED ${core_sources}) |
15 | else() | ||
16 | add_library(toxcore ${core_sources}) | ||
17 | endif() | ||
18 | |||
19 | target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) | ||
21 | 20 | ||
22 | if(WIN32) | 21 | if(WIN32) |
23 | target_link_libraries(toxcore ws2_32) | 22 | target_link_libraries(toxcore ws2_32) |