mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #302 from ChlorideCull/master
Changed CMake options to compile the core as a shared library instead of static
This commit is contained in:
commit
7b84aaaac8
|
@ -33,15 +33,15 @@ if(NOT USE_NACL)
|
|||
endif()
|
||||
|
||||
macro(linkCoreLibraries exe_name)
|
||||
add_dependencies(${exe_name} core)
|
||||
add_dependencies(${exe_name} toxcore)
|
||||
if(WIN32)
|
||||
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
|
||||
ws2_32)
|
||||
else()
|
||||
include_directories(${SODIUM_INCLUDE_DIR})
|
||||
target_link_libraries(${exe_name} core
|
||||
target_link_libraries(${exe_name} toxcore
|
||||
${LINK_CRYPTO_LIBRARY})
|
||||
|
||||
endif()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 2.6.0)
|
||||
project(core C)
|
||||
project(toxcore C)
|
||||
|
||||
if(WIN32)
|
||||
include_directories(${CMAKE_HOME_DIRECTORY}/sodium/include/)
|
||||
|
@ -16,4 +16,4 @@ set(core_sources
|
|||
LAN_discovery.c
|
||||
Messenger.c)
|
||||
|
||||
add_library(core ${core_sources})
|
||||
add_library(toxcore SHARED ${core_sources})
|
||||
|
|
Loading…
Reference in New Issue
Block a user