aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index adb9894a3c..f0a04efe23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,11 +15,22 @@ else()
set(DEBUG 0)
endif()
+# Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD
+# explicitly to indicate a strong preference for pthread. It is an error to not
+# have pthread installed even if, for example, the Win32 threading API is found.
+set(CMAKE_THREAD_PREFER_PTHREAD ON)
+find_package(Threads REQUIRED)
+if(NOT CMAKE_USE_PTHREADS_INIT)
+ message(SEND_ERROR "The pthread library must be installed on your system.")
+endif(NOT CMAKE_USE_PTHREADS_INIT)
+
# add dependencies to include/lib directories
link_directories ("${PROJECT_SOURCE_DIR}/.deps/usr/lib")
include_directories ("${PROJECT_SOURCE_DIR}/.deps/usr/include")
include_directories ("${PROJECT_BINARY_DIR}/config")
+set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+
add_subdirectory(src)
add_subdirectory(config)