summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c16ce6fe..c18d41d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,14 @@
1cmake_minimum_required(VERSION 2.6.0) 1cmake_minimum_required(VERSION 2.6.0)
2 2
3set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
4
3#MinGW prints more warnings for -Wall than gcc does, thus causing build to fail 5#MinGW prints more warnings for -Wall than gcc does, thus causing build to fail
4if(NOT WIN32) 6if(NOT WIN32)
5 if(("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")) 7 if(("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang"))
6 message(STATUS "==== ${CMAKE_C_COMPILER_ID} detected - Adding compiler flags ====") 8 message(STATUS "==== ${CMAKE_C_COMPILER_ID} detected - Adding compiler flags ====")
7 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") 9 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
8 endif() 10 endif()
11 find_package(SODIUM REQUIRED)
9endif() 12endif()
10 13
11macro(linkCoreLibraries exe_name) 14macro(linkCoreLibraries exe_name)
@@ -16,8 +19,9 @@ macro(linkCoreLibraries exe_name)
16 ${CMAKE_SOURCE_DIR}/sodium/lib/libsodium.a 19 ${CMAKE_SOURCE_DIR}/sodium/lib/libsodium.a
17 ws2_32) 20 ws2_32)
18 else() 21 else()
22 include_directories(${SODIUM_INCLUDE_DIR})
19 target_link_libraries(${exe_name} core 23 target_link_libraries(${exe_name} core
20 sodium) 24 ${SODIUM_LIBRARY})
21 endif() 25 endif()
22endmacro() 26endmacro()
23 27
@@ -25,4 +29,4 @@ cmake_policy(SET CMP0011 NEW)
25 29
26add_subdirectory(core) 30add_subdirectory(core)
27add_subdirectory(testing) 31add_subdirectory(testing)
28add_subdirectory(other) \ No newline at end of file 32add_subdirectory(other)