forked from hampusborgos/rme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (43 loc) · 1.34 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
45
46
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required(VERSION 3.1)
project(rme)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()
find_package(asio CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(OpenGL REQUIRED)
# LibArchive disabled in compilation level by default, see "#define OTGZ_SUPPORT" in the "definitions.h" file
# If you need use, enable this:
#find_package(LibArchive REQUIRED)
#${LibArchive_INCLUDE_DIRS} ${LibArchive_LIBRARIES}
#if(APPLE)
# set(CMAKE_PREFIX_PATH /usr/local/opt/libarchive)
#endif()
if(WIN32)
set(Boost_THREADAPI win32)
endif()
find_package(wxWidgets COMPONENTS html aui gl adv core net base REQUIRED)
find_package(GLUT REQUIRED)
find_package(ZLIB REQUIRED)
include(${wxWidgets_USE_FILE})
include(source/CMakeLists.txt)
add_executable(${PROJECT_NAME} ${rme_H} ${rme_SRC})
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20)
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD_REQUIRED ON)
include_directories(
${LibArchive_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
)
target_link_libraries(${PROJECT_NAME}
${wxWidgets_LIBRARIES}
${LibArchive_LIBRARIES}
${OPENGL_LIBRARIES}
${GLUT_LIBRARIES}
${ZLIB_LIBRARIES}
fmt::fmt
asio::asio
nlohmann_json::nlohmann_json
)