diff options
author | irungentoo <irungentoo@gmail.com> | 2013-08-04 19:49:08 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-08-04 19:49:08 -0700 |
commit | 5e43dc7bd8c790a43c22fd6ab47e9dbef9205186 (patch) | |
tree | 0a1b3d5316ed4885157d2f7eb19d58b54eae4153 /core | |
parent | c1e4365d1d39876f5cb088d7850ae6a3b53d9833 (diff) | |
parent | ca3380ba2f50a8b793c795d5bbc815179b10375e (diff) |
Merge pull request #331 from nurupo/master
cmake improvements
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) |