summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRobin Linden <dev@robinlinden.eu>2020-05-14 01:50:43 +0200
committerRobin Linden <dev@robinlinden.eu>2020-05-29 15:36:26 +0200
commit56992b099eb5b77adfca15678ada9ec4011d8dd3 (patch)
tree4500cb5650fccff7294de22a2f72743984292d83 /CMakeLists.txt
parent03a511482ffa643a636cd5bcce596f110ca2d8e0 (diff)
Add support for the conan C/C++ package manager
* Don't overwrite the CMAKE_MODULE_PATH * Allow linking libsodium statically with MSVC * Allow finding libsodium the normal way on MSVC * Allow using pthreads4w for pthreads on MSVC * Fall back to find_package if pkg_find_module fails * Don't pass incompatible compile flags to MSVC * Also try to find Opus and libvpx using their canonical names * Support building using conan * Allow pkg_use_module to take a list of libraries to look for * Build for Windows on Appveyor using conan
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51e1e99f..98a4eabe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@ cmake_minimum_required(VERSION 2.8.12)
18cmake_policy(VERSION 2.8.12) 18cmake_policy(VERSION 2.8.12)
19project(toxcore) 19project(toxcore)
20 20
21set(CMAKE_MODULE_PATH ${toxcore_SOURCE_DIR}/cmake) 21list(APPEND CMAKE_MODULE_PATH ${toxcore_SOURCE_DIR}/cmake)
22 22
23################################################################################ 23################################################################################
24# 24#
@@ -115,6 +115,13 @@ option(NON_HERMETIC_TESTS "Whether to build and run tests that depend on an inte
115option(BUILD_TOXAV "Whether to build the tox AV library" ON) 115option(BUILD_TOXAV "Whether to build the tox AV library" ON)
116option(MUST_BUILD_TOXAV "Fail the build if toxav cannot be built" OFF) 116option(MUST_BUILD_TOXAV "Fail the build if toxav cannot be built" OFF)
117 117
118if(MSVC)
119 option(MSVC_STATIC_SODIUM "Whether to link libsodium statically for MSVC" OFF)
120 if(MSVC_STATIC_SODIUM)
121 add_definitions(-DSODIUM_STATIC=1 -DSODIUM_EXPORT)
122 endif()
123endif()
124
118include(Dependencies) 125include(Dependencies)
119 126
120if(MUST_BUILD_TOXAV) 127if(MUST_BUILD_TOXAV)