summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-04 19:49:08 -0700
committerirungentoo <irungentoo@gmail.com>2013-08-04 19:49:08 -0700
commit5e43dc7bd8c790a43c22fd6ab47e9dbef9205186 (patch)
tree0a1b3d5316ed4885157d2f7eb19d58b54eae4153 /core
parentc1e4365d1d39876f5cb088d7850ae6a3b53d9833 (diff)
parentca3380ba2f50a8b793c795d5bbc815179b10375e (diff)
Merge pull request #331 from nurupo/master
cmake improvements
Diffstat (limited to 'core')
-rw-r--r--core/CMakeLists.txt15
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 @@
1cmake_minimum_required(VERSION 2.6.0) 1cmake_minimum_required(VERSION 2.6.0)
2project(toxcore C) 2project(toxcore C)
3 3
4if(WIN32)
5 include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/)
6else(WIN32)
7 include_directories(${SODIUM_INCLUDE_DIR})
8endif()
9
10set(core_sources 4set(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
19add_library(toxcore SHARED ${core_sources}) 13if(SHARED_TOXCORE)
20target_link_libraries(toxcore ${SODIUM_LIBRARY}) 14 add_library(toxcore SHARED ${core_sources})
15else()
16 add_library(toxcore ${core_sources})
17endif()
18
19target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY})
21 20
22if(WIN32) 21if(WIN32)
23 target_link_libraries(toxcore ws2_32) 22 target_link_libraries(toxcore ws2_32)