summaryrefslogtreecommitdiff
path: root/core/CMakeLists.txt
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2013-08-04 21:38:12 -0400
committerMaxim Biro <nurupo.contributions@gmail.com>2013-08-04 22:25:07 -0400
commit03a2bac3190b7044e8cbd66339c6f9d76bfc48ef (patch)
tree760d03540479da34072f4036a64ed3250734a9e4 /core/CMakeLists.txt
parentf03dc44e97e993024e42b3a0915de6401d9cecb0 (diff)
Improved cmake
Diffstat (limited to 'core/CMakeLists.txt')
-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)