Changed CMake options to compile the core shared

It is now compiled under 'toxcore' instead of just 'core' to be able to be installed without conflicts.
This commit is contained in:
Chloride Cull 2013-08-03 18:25:12 +02:00
parent 08fbaf0c53
commit add9c0b6dc
2 changed files with 5 additions and 5 deletions

View File

@ -33,15 +33,15 @@ if(NOT USE_NACL)
endif() endif()
macro(linkCoreLibraries exe_name) macro(linkCoreLibraries exe_name)
add_dependencies(${exe_name} core) add_dependencies(${exe_name} toxcore)
if(WIN32) if(WIN32)
include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/) include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/)
target_link_libraries(${exe_name} core target_link_libraries(${exe_name} toxcore
${CMAKE_SOURCE_DIR}/sodium/lib/libsodium.a ${CMAKE_SOURCE_DIR}/sodium/lib/libsodium.a
ws2_32) ws2_32)
else() else()
include_directories(${SODIUM_INCLUDE_DIR}) include_directories(${SODIUM_INCLUDE_DIR})
target_link_libraries(${exe_name} core target_link_libraries(${exe_name} toxcore
${LINK_CRYPTO_LIBRARY}) ${LINK_CRYPTO_LIBRARY})
endif() endif()

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.6.0) cmake_minimum_required(VERSION 2.6.0)
project(core C) project(toxcore C)
if(WIN32) if(WIN32)
include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/) include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/)
@ -16,4 +16,4 @@ set(core_sources
LAN_discovery.c LAN_discovery.c
Messenger.c) Messenger.c)
add_library(core ${core_sources}) add_library(toxcore SHARED ${core_sources})