Skip to content

Commit 67205ac

Browse files
committed
Reduce minimum required CMake version to 3.2
1 parent 294a861 commit 67205ac

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

3rdparty/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
# for setting BGFX_CONFIG_RENDERER_OPENGL
1111
# need a newer version of bgfx/bigg to take effect
1212

13-
add_compile_definitions(BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=43)
14-
#add_compile_definitions(BGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION=43)
15-
#add_compile_definitions(BGFX_CONFIG_RENDERER_OPENGL=43)
13+
add_definitions(-DBGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=43)
14+
#add_definitions(-DBGFX_CONFIG_RENDERER_OPENGLES_MIN_VERSION=43)
15+
#add_definitions(-DBGFX_CONFIG_RENDERER_OPENGL=43)
1616
set(BIGG_EXAMPLES OFF CACHE INTERNAL "")
1717
set(BGFX_BUILD_EXAMPLES OFF CACHE INTERNAL "")
1818
add_subdirectory(bigg)

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
cmake_minimum_required(VERSION 3.13)
1+
cmake_minimum_required(VERSION 3.2)
22

33
project(cluster CXX)
44
set(CMAKE_CXX_STANDARD 14)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

7-
if(NOT CMAKE_BUILD_TYPE)
7+
if(NOT CMAKE_BUILD_TYPE)
88
set(CMAKE_BUILD_TYPE Release)
9-
endif(NOT CMAKE_BUILD_TYPE)
9+
endif()
1010

1111
set(BUILD_SHARED_LIBS OFF)
1212

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ A few useful resources that helped with the implementation:
8080

8181
## Compilation
8282

83-
Recent [CMake](https://cmake.org/) version (>= 3.13) required.
83+
[CMake](https://cmake.org/) (>= 3.2) is required for building.
8484

8585
1. Generate project files:
8686
```bash

src/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ set(SHADERS
6666
Renderer/Shaders/util.sh
6767
)
6868

69-
add_executable(Cluster ${SOURCES} ${SHADERS})
69+
if(MSVC)
70+
# hide console window on Windows
71+
# for some reason this still requires WIN32 in add_executable to work
72+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
73+
set(PLATFORM WIN32)
74+
endif()
75+
76+
add_executable(Cluster ${PLATFORM} ${SOURCES} ${SHADERS})
7077
target_include_directories(Cluster PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
7178
target_link_libraries(Cluster PRIVATE bigg IconFontCppHeaders assimp spdlog)
7279
target_compile_definitions(Cluster PRIVATE
@@ -94,8 +101,6 @@ if(MSVC)
94101
# disable macro redefinition warning
95102
# ideally 3rd party include folders were marked as SYSTEM so we wouldn't get these warnings
96103
target_compile_options(Cluster PRIVATE "/wd4005")
97-
# hide console window
98-
target_link_options(Cluster PRIVATE "/SUBSYSTEM:WINDOWS" "/ENTRY:mainCRTStartup")
99104
endif()
100105

101106
set(SHADER_DIR "${PROJECT_BINARY_DIR}/shaders")

0 commit comments

Comments
 (0)