-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
65 lines (49 loc) · 1.8 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
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
set(_SOURCE_DIRECTORY "Source")
set(_RESOURCES_DIRECTORY "Resources")
set(_LIBRARY_DIRECTORY "Libraries")
set(_PROJECT_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${_SOURCE_DIRECTORY}/Project.h")
set(APPLICATION_NAME "Duke Nukem 3D Mod Manager")
string(REPLACE " " "" _PROJECT_NAME ${APPLICATION_NAME})
set(APPLICATION_REPOSITORY_URL "https://github.com/nitro404/Duke3D_Mod_Manager")
add_subdirectory(${_LIBRARY_DIRECTORY}/Core)
list(APPEND CMAKE_MODULE_PATH "${CORE_DIRECTORY}/CMake")
include(Modules/GetGitCommitHash)
include(Hunter/HunterInit)
project(${_PROJECT_NAME} VERSION 0.0.1.0 LANGUAGES C CXX)
include(Environment)
include(ThirdPartyLibraries)
get_git_commit_hash()
set(APPLICATION_GIT_COMMIT_HASH ${GIT_COMMIT_HASH})
configure_file("${_PROJECT_FILE_PATH}.in" "${_PROJECT_FILE_PATH}" @ONLY)
if(WIN32)
set(_RESOURCE_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Resources/Windows/Resource.rc")
set(AUTHOR_NAME "Kevin Scroggins")
string(TIMESTAMP CURRENT_YEAR "%Y")
string(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%d %H:%M:%S")
configure_file("${_RESOURCE_FILE_PATH}.in" "${_RESOURCE_FILE_PATH}" @ONLY)
endif()
include(SourceFiles)
include(ResourceFiles)
if(MSVC)
add_compile_options(/bigobj)
add_compile_options(/Zc:__cplusplus)
else()
add_compile_options(-Wa,-mbig-obj)
endif()
add_executable(${PROJECT_NAME} WIN32 ${SOURCE_FILES} ${RESOURCE_FILES})
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
target_include_directories(${PROJECT_NAME}
PUBLIC
${_SOURCE_DIRECTORY}
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
Core
expat::libexpat
JDKSMIDI::jdksmidi
SndFile::sndfile
${wxWidgets_LIBRARIES}
)