File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed
Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 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)
1616set (BIGG_EXAMPLES OFF CACHE INTERNAL "" )
1717set (BGFX_BUILD_EXAMPLES OFF CACHE INTERNAL "" )
1818add_subdirectory (bigg)
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.13 )
1+ cmake_minimum_required (VERSION 3.2 )
22
33project (cluster CXX)
44set (CMAKE_CXX_STANDARD 14)
55set (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
1111set (BUILD_SHARED_LIBS OFF )
1212
Original file line number Diff line number Diff 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
85851 . Generate project files:
8686 ``` bash
Original file line number Diff line number Diff 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} )
7077target_include_directories (Cluster PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
7178target_link_libraries (Cluster PRIVATE bigg IconFontCppHeaders assimp spdlog)
7279target_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" )
99104endif ()
100105
101106set (SHADER_DIR "${PROJECT_BINARY_DIR} /shaders" )
You can’t perform that action at this time.
0 commit comments