-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
41 lines (33 loc) · 917 Bytes
/
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
cmake_minimum_required(VERSION 3.1)
project(MC2MT)
add_executable(${PROJECT_NAME}
"${PROJECT_SOURCE_DIR}/src/main.cpp"
"${PROJECT_SOURCE_DIR}/src/convert.cpp"
"${PROJECT_SOURCE_DIR}/src/threads.cpp"
"${PROJECT_SOURCE_DIR}/src/MCMap.cpp"
"${PROJECT_SOURCE_DIR}/src/MTMap.cpp"
)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
add_subdirectory(nbt)
add_subdirectory(cpfs)
find_package(Threads REQUIRED)
find_package(SQLite3 REQUIRED)
target_link_libraries(${PROJECT_NAME}
Threads::Threads
"nbt"
"CPFS"
${ZLIB_LIBRARY}
${SQLite3_LIBRARY}
)
include_directories(
"${NBT_SOURCE_DIR}/src"
"${CPFS_SOURCE_DIR}/src"
${ZLIB_INCLUDE_DIRS}
${SQLite3_INCLUDE_DIR}
)
if (MINGW)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads")
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES
COMPILE_FLAGS "-std=c++11 -Wall -Wextra -Wpedantic"
RUNTIME_OUTPUT_DIRECTORY "bin")