forked from brokenstuff/Repetier-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (36 loc) · 1.65 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Main CMake file
project(Repetier-Server)
cmake_minimum_required(VERSION 2.6)
# Appends the cmake/modules path inside the MAKE_MODULE_PATH variable which stores the
# directories of additional CMake modules (eg MacroOutOfSourceBuild.cmake):
set(CMAKE_MODULE_PATH ${Repetier-Server_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
# The macro below forces the build directory to be different from source directory:
include(MacroOutOfSourceBuild)
macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build.")
############## include Boost
# Activate debug if you don't know where cmake is looking for your boost files
set(Boost_DEBUG 1)
SET(BOOST_INCLUDEDIR "C:/Boost/include/boost-1_52")
SET(BOOST_LIBRARYDIR "C:/Boost/lib")
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.48.0 COMPONENTS filesystem thread program_options system date_time chrono regex)
IF (Boost_FOUND)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
ADD_DEFINITIONS( "-DHAS_BOOST" )
# target_link_libraries("Repetier-Server" ${Boost_LIBRARIES})
ENDIF()
add_subdirectory(Repetier-Server)
INCLUDE_DIRECTORIES("Repetier-Server/json_spirit")
INCLUDE_DIRECTORIES("Repetier-Server/mongoose")
INCLUDE_DIRECTORIES("Repetier-Server/moFileReader")
INCLUDE_DIRECTORIES("Repetier-Server/libconfig")
INCLUDE_DIRECTORIES("Repetier-Server/server")
#message("Files: ${RepetierServer_SOURCES}")
#message("Boost libs: ${Boost_LIBRARIES}")
add_executable("RepetierServer" ${RepetierServer_SOURCES})
target_link_libraries("RepetierServer" ${Boost_LIBRARIES})
IF (UNIX)
target_link_libraries(RepetierServer dl m)
ENDIF (UNIX)