|
| 1 | +Index: CMakeLists.txt |
| 2 | +--- CMakeLists.txt |
| 3 | ++++ CMakeLists.txt |
| 4 | +@@ -1,12 +1,14 @@ |
| 5 | + cmake_minimum_required(VERSION 3.2) |
| 6 | + |
| 7 | +-project(RBDoom3BFG) |
| 8 | ++project(rbdoom3bfg) |
| 9 | + |
| 10 | ++include_directories(/usr/X11R6/include) |
| 11 | ++ |
| 12 | + set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
| 13 | + set_property(GLOBAL PROPERTY USE_FOLDERS ON) |
| 14 | + if(CMAKE_MAJOR_VERSION EQUAL 3 AND CMAKE_MINOR_VERSION GREATER_EQUAL 6) |
| 15 | + # set MSVC startup project |
| 16 | +- set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT RBDoom3BFG) |
| 17 | ++ set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT rbdoom3bfg) |
| 18 | + endif() |
| 19 | + |
| 20 | + option(STANDALONE |
| 21 | +@@ -141,15 +143,15 @@ |
| 22 | + add_definitions(-Werror=format-security) |
| 23 | + add_definitions(-Werror=format) |
| 24 | + |
| 25 | +- # Compiler check (needs -std=c++11 flag) |
| 26 | ++ # Compiler check (needs -std=c++14 flag) |
| 27 | + include(CheckCXXCompilerFlag) |
| 28 | +- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) |
| 29 | +- if(COMPILER_SUPPORTS_CXX11) |
| 30 | +- set(CMAKE_CXX_STANDARD 11) |
| 31 | ++ CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17) |
| 32 | ++ if(COMPILER_SUPPORTS_CXX17) |
| 33 | ++ set(CMAKE_CXX_STANDARD 17) |
| 34 | + set(CMAKE_CXX_STANDARD_REQUIRED ON) |
| 35 | + set(CMAKE_CXX_EXTENSIONS OFF) |
| 36 | + else() |
| 37 | +- message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") |
| 38 | ++ message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++17 support. Please use a different C++ compiler.") |
| 39 | + endif() |
| 40 | + |
| 41 | + if(CPU_TYPE) |
| 42 | +@@ -178,7 +180,7 @@ |
| 43 | + # add clang-specific settings for warnings (the second one make sure clang doesn't complain |
| 44 | + # about unknown -W flags, like -Wno-unused-but-set-variable) |
| 45 | + # SRS - Add -Wno-deprecated-register and -Wno-expansion-to-defined to list of warning settings |
| 46 | +- add_definitions(-Wno-local-type-template-args -Wno-unknown-warning-option -Wno-inline-new-delete -Wno-switch-enum -Wno-deprecated-register -Wno-expansion-to-defined) |
| 47 | ++ add_definitions(-Wno-dev -Wno-deprecated-declarations -Wno-local-type-template-args -Wno-unknown-warning-option -Wno-inline-new-delete -Wno-switch-enum -Wno-deprecated-register -Wno-expansion-to-defined) |
| 48 | + endif() |
| 49 | + |
| 50 | + if(NOT CMAKE_CROSSCOMPILING AND ONATIVE) |
| 51 | +@@ -385,6 +385,9 @@ if(USE_VULKAN) |
| 52 | + endif() |
| 53 | + |
| 54 | + else() |
| 55 | ++ find_package(glslang) |
| 56 | ++ find_package(SPIRV-Tools REQUIRED) |
| 57 | ++ if(NOT (${glslang_FOUND} AND ${SPIRV-Tools_FOUND})) |
| 58 | + # override Glslang build options |
| 59 | + |
| 60 | + # options required by November 2018 release |
| 61 | +@@ -408,6 +411,7 @@ if(USE_VULKAN) |
| 62 | + include_directories(${GLSLANG_DIR}) |
| 63 | + |
| 64 | + #link_directories($ENV{VULKAN_SDK}/Lib) |
| 65 | ++ endif() |
| 66 | + endif() |
| 67 | + |
| 68 | + # Use FindVulkan module added with CMAKE 3.7 |
| 69 | +@@ -1648,10 +1648,10 @@ |
| 70 | + |
| 71 | + list(APPEND RBDOOM3_SOURCES ${WIN32_RESOURCES}) |
| 72 | + |
| 73 | +- add_executable(RBDoom3BFG WIN32 ${RBDOOM3_INCLUDES} ${RBDOOM3_SOURCES}) |
| 74 | ++ add_executable(rbdoom3bfg WIN32 ${RBDOOM3_INCLUDES} ${RBDOOM3_SOURCES}) |
| 75 | + |
| 76 | +- add_dependencies(RBDoom3BFG idlib) |
| 77 | +- target_link_libraries(RBDoom3BFG |
| 78 | ++ add_dependencies(rbdoom3bfg idlib) |
| 79 | ++ target_link_libraries(rbdoom3bfg |
| 80 | + idlib |
| 81 | + ${DirectX_LIBRARIES} |
| 82 | + dbghelp |
| 83 | +@@ -1672,15 +1672,15 @@ |
| 84 | + |
| 85 | + # set MSVC default debug directory on executable |
| 86 | + if(CMAKE_MAJOR_VERSION EQUAL 3 AND CMAKE_MINOR_VERSION GREATER_EQUAL 8) |
| 87 | +- set_target_properties(RBDoom3BFG PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/..") |
| 88 | ++ set_target_properties(rbdoom3bfg PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/..") |
| 89 | + endif() |
| 90 | + |
| 91 | + #CMAKE_BINARY_DIR |
| 92 | + if(CMAKE_CL_64) |
| 93 | +- install(TARGETS RBDoom3BFG |
| 94 | ++ install(TARGETS rbdoom3bfg |
| 95 | + RUNTIME DESTINATION .) |
| 96 | + else() |
| 97 | +- install(TARGETS RBDoom3BFG |
| 98 | ++ install(TARGETS rbdoom3bfg |
| 99 | + RUNTIME DESTINATION .) |
| 100 | + endif() |
| 101 | + |
| 102 | +@@ -1809,13 +1809,13 @@ |
| 103 | + SEPARATE_ARGUMENTS(_compiler_FLAGS) |
| 104 | + |
| 105 | + if(USE_PRECOMPILED_HEADERS) |
| 106 | +- # we need to recreate the precompiled header for RBDoom3BFG |
| 107 | ++ # we need to recreate the precompiled header for rbdoom3bfg |
| 108 | + # (i.e. can't use the one created for idlib before) |
| 109 | + # because some definitions (e.g. -D__IDLIB__ -D__DOOM_DLL__) differ |
| 110 | + add_custom_target(precomp_header_rbdoom3bfg ALL |
| 111 | + COMMAND ${CMAKE_CXX_COMPILER} ${_compiler_FLAGS} -x c++-header idlib/precompiled.h -o idlib/precompiled.h.gch |
| 112 | + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
| 113 | +- COMMENT "Creating idlib/precompiled.h.gch for RBDoom3BFG" |
| 114 | ++ COMMENT "Creating idlib/precompiled.h.gch for rbdoom3bfg" |
| 115 | + ) |
| 116 | + endif() |
| 117 | + |
| 118 | +@@ -1839,14 +1839,14 @@ |
| 119 | + add_dependencies(precomp_header_rbdoom3bfg idlib) |
| 120 | + endif() |
| 121 | + |
| 122 | +- add_executable(RBDoom3BFG WIN32 ${RBDOOM3_SOURCES}) |
| 123 | ++ add_executable(rbdoom3bfg WIN32 ${RBDOOM3_SOURCES}) |
| 124 | + |
| 125 | + if (USE_PRECOMPILED_HEADERS) |
| 126 | + # make sure precompiled header is created before executable is compiled |
| 127 | +- add_dependencies(RBDoom3BFG precomp_header_rbdoom3bfg) |
| 128 | ++ add_dependencies(rbdoom3bfg precomp_header_rbdoom3bfg) |
| 129 | + |
| 130 | + # make sure precompiled header is deleted after executable is compiled |
| 131 | +- add_dependencies(rm_precomp_header RBDoom3BFG) |
| 132 | ++ add_dependencies(rm_precomp_header rbdoom3bfg) |
| 133 | + endif() |
| 134 | + |
| 135 | + if(NOT WIN32) |
| 136 | +@@ -1854,7 +1854,7 @@ |
| 137 | + set(RT_LIBRARY rt) |
| 138 | + endif() |
| 139 | + |
| 140 | +- target_link_libraries(RBDoom3BFG |
| 141 | ++ target_link_libraries(rbdoom3bfg |
| 142 | + idlib |
| 143 | + ${Vulkan_LIBRARIES} |
| 144 | + ${OPENGL_LIBRARIES} |
| 145 | +@@ -1863,7 +1865,7 @@ |
| 146 | + ${Vulkan_LIBRARIES} |
| 147 | + ${OPENGL_LIBRARIES} |
| 148 | + pthread |
| 149 | +- ${RT_LIBRARY} |
| 150 | ++ #${RT_LIBRARY} |
| 151 | + ${SDLx_LIBRARY} |
| 152 | + ${OPENAL_LIBRARY} |
| 153 | + ${FFMPEG_LIBRARIES} |
0 commit comments