Set C++ standard; code formatting.
On MacOS, clang will default to C++2003 if this isn't explicitly set.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(kge)
|
||||
project(kge LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
@@ -23,28 +25,25 @@ add_library(imgui STATIC
|
||||
ext/imgui/backends/imgui_impl_opengl3.cpp
|
||||
ext/imgui/backends/imgui_impl_opengl3.h
|
||||
|
||||
ext/imgui/misc/freetype/imgui_freetype.cpp
|
||||
ext/imgui/misc/freetype/imgui_freetype.h
|
||||
)
|
||||
ext/imgui/misc/freetype/imgui_freetype.cpp
|
||||
ext/imgui/misc/freetype/imgui_freetype.h)
|
||||
add_library(imgui::imgui ALIAS imgui)
|
||||
target_link_libraries(imgui
|
||||
PUBLIC
|
||||
OpenGL::GL
|
||||
$<TARGET_NAME_IF_EXISTS:SDL2::SDL2main>
|
||||
$<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>
|
||||
Freetype::Freetype
|
||||
)
|
||||
PUBLIC
|
||||
OpenGL::GL
|
||||
$<TARGET_NAME_IF_EXISTS:SDL2::SDL2main>
|
||||
$<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>
|
||||
Freetype::Freetype)
|
||||
target_include_directories(imgui PUBLIC
|
||||
ext/imgui/
|
||||
ext/imgui/backends/
|
||||
ext/imgui/misc/freetype
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
)
|
||||
ext/imgui/
|
||||
ext/imgui/backends/
|
||||
ext/imgui/misc/freetype
|
||||
${FREETYPE_INCLUDE_DIRS})
|
||||
|
||||
include_directories(ext/)
|
||||
include_directories(ext/ ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
add_executable(kge
|
||||
kge.cc
|
||||
)
|
||||
kge.cc
|
||||
)
|
||||
target_link_libraries(kge imgui)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user