From 03a2bac3190b7044e8cbd66339c6f9d76bfc48ef Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Sun, 4 Aug 2013 21:38:12 -0400 Subject: Improved cmake --- core/CMakeLists.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'core/CMakeLists.txt') 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 @@ cmake_minimum_required(VERSION 2.6.0) project(toxcore C) -if(WIN32) - include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/) -else(WIN32) - include_directories(${SODIUM_INCLUDE_DIR}) -endif() - set(core_sources DHT.c network.c @@ -16,8 +10,13 @@ set(core_sources LAN_discovery.c Messenger.c) -add_library(toxcore SHARED ${core_sources}) -target_link_libraries(toxcore ${SODIUM_LIBRARY}) +if(SHARED_TOXCORE) + add_library(toxcore SHARED ${core_sources}) +else() + add_library(toxcore ${core_sources}) +endif() + +target_link_libraries(toxcore ${LINK_CRYPTO_LIBRARY}) if(WIN32) target_link_libraries(toxcore ws2_32) -- cgit v1.2.3