mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 03:03:29 +01:00
update all cmake files to version 3.9
other misc cmake fixes version 3.9 allows for ipo (lto)
This commit is contained in:
parent
052bdb45ec
commit
6b06d5cb99
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
# cmake setup begin
|
||||
project(MushMachine C CXX)
|
||||
@ -19,6 +19,11 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
# add this to your projects cmake to enable ipo
|
||||
#include(CheckIPOSupported)
|
||||
#check_ipo_supported()
|
||||
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
||||
|
||||
# enable test
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
include(CTest)
|
||||
|
2
external/CMakeLists.txt
vendored
2
external/CMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
# external libs
|
||||
|
||||
|
2
external/ImGuiColorTextEdit.cmake
vendored
2
external/ImGuiColorTextEdit.cmake
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
add_library(imgui_color_text_edit
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ImGuiColorTextEdit/TextEditor.h"
|
||||
|
3
external/SquirrelNoise/CMakeLists.txt
vendored
3
external/SquirrelNoise/CMakeLists.txt
vendored
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(SquirrelNoise)
|
||||
|
||||
add_library(squirrel_noise
|
||||
|
2
external/entt.cmake
vendored
2
external/entt.cmake
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
add_library(entt INTERFACE)
|
||||
target_include_directories(entt INTERFACE "${CMAKE_CURRENT_LIST_DIR}/entt/src")
|
||||
target_compile_features(entt INTERFACE cxx_std_17)
|
||||
|
7
external/glad-debug/CMakeLists.txt
vendored
7
external/glad-debug/CMakeLists.txt
vendored
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(glad C)
|
||||
|
||||
set(C_FILES
|
||||
@ -15,8 +16,6 @@ add_library(glad ${C_FILES} ${H_FILES})
|
||||
target_include_directories(glad PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
if(UNIX)
|
||||
target_link_libraries(glad
|
||||
dl
|
||||
)
|
||||
target_link_libraries(glad dl)
|
||||
endif()
|
||||
|
||||
|
2
external/glm.cmake
vendored
2
external/glm.cmake
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
add_library(glm INTERFACE)
|
||||
target_include_directories(glm INTERFACE "${CMAKE_CURRENT_LIST_DIR}/glm")
|
||||
|
2
external/icon_font_cpp_headers.cmake
vendored
2
external/icon_font_cpp_headers.cmake
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
add_library(icon_font_cpp_headers INTERFACE)
|
||||
target_include_directories(icon_font_cpp_headers INTERFACE "${CMAKE_CURRENT_LIST_DIR}/IconFontCppHeaders/")
|
||||
|
||||
|
2
external/json/CMakeLists.txt
vendored
2
external/json/CMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
##
|
||||
## PROJECT
|
||||
|
2
external/physfs/CMakeLists.txt
vendored
2
external/physfs/CMakeLists.txt
vendored
@ -13,7 +13,7 @@
|
||||
# compile, using preprocessor checks for platform-specific bits instead of
|
||||
# testing in here.
|
||||
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(PhysicsFS)
|
||||
set(PHYSFS_VERSION 3.1.0)
|
||||
|
2
external/soloud/CMakeLists.txt
vendored
2
external/soloud/CMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(soloud CXX)
|
||||
|
||||
|
2
external/stb/CMakeLists.txt
vendored
2
external/stb/CMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(stb CXX)
|
||||
|
||||
|
2
external/tracy/CMakeLists.txt
vendored
2
external/tracy/CMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
if(NOT EMSCRIPTEN)
|
||||
add_library(tracy_client
|
||||
|
@ -1,5 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
project(framework CXX)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(framework)
|
||||
|
||||
add_subdirectory(engine)
|
||||
add_subdirectory(logger)
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(common_components CXX)
|
||||
|
||||
add_library(common_components INTERFACE)
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(engine CXX)
|
||||
|
||||
add_library(engine
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(filesystem_service CXX)
|
||||
|
||||
add_library(filesystem_service
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(imgui_lib CXX)
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(input_service CXX)
|
||||
|
||||
add_library(input_service
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(logger CXX)
|
||||
|
||||
file(GLOB_RECURSE CPP_FILES src/*.cpp)
|
||||
|
@ -1,10 +1,33 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(opengl_primitives CXX)
|
||||
|
||||
file(GLOB_RECURSE CPP_FILES src/*.cpp)
|
||||
file(GLOB_RECURSE HPP_FILES src/*.hpp)
|
||||
|
||||
add_library(opengl_primitives ${CPP_FILES} ${HPP_FILES})
|
||||
add_library(opengl_primitives
|
||||
src/mm/opengl/buffer.hpp
|
||||
src/mm/opengl/buffer.cpp
|
||||
src/mm/opengl/fbo_builder.hpp
|
||||
src/mm/opengl/fbo_builder.cpp
|
||||
src/mm/opengl/frame_buffer_object.hpp
|
||||
src/mm/opengl/frame_buffer_object.cpp
|
||||
src/mm/opengl/instance_buffer.hpp
|
||||
src/mm/opengl/shader.hpp
|
||||
src/mm/opengl/shader.cpp
|
||||
src/mm/opengl/shader_builder.hpp
|
||||
src/mm/opengl/shader_builder.cpp
|
||||
src/mm/opengl/spritesheet.hpp
|
||||
src/mm/opengl/texture.hpp
|
||||
src/mm/opengl/texture.cpp
|
||||
src/mm/opengl/texture_loader.hpp
|
||||
src/mm/opengl/texture_loader.cpp
|
||||
src/mm/opengl/vertex_array_object.hpp
|
||||
src/mm/opengl/vertex_array_object.cpp
|
||||
|
||||
|
||||
src/mm/opengl/components/texture.hpp
|
||||
)
|
||||
|
||||
target_include_directories(opengl_primitives PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(opengl_renderer CXX)
|
||||
|
||||
add_library(opengl_renderer_s
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(organizer_scene CXX)
|
||||
|
||||
add_library(organizer_scene
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(random CXX)
|
||||
|
||||
add_library(random
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(resource_manager CXX)
|
||||
|
||||
add_library(resource_manager INTERFACE)
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(screen_director CXX)
|
||||
|
||||
add_library(screen_director
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(sdl_service CXX)
|
||||
|
||||
add_library(sdl_service
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(simple_sdl_renderer_service CXX)
|
||||
|
||||
add_library(simple_sdl_renderer_service
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(sound_service CXX)
|
||||
|
||||
add_library(sound_service
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(std_utils CXX)
|
||||
|
||||
add_library(std_utils INTERFACE)
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(tilemap CXX)
|
||||
|
||||
add_library(tilemap
|
||||
|
@ -1,5 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
project(screens CXX)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(screens)
|
||||
|
||||
if(NOT MM_HEADLESS)
|
||||
add_subdirectory(mm_logo)
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(mm_logo_screen CXX)
|
||||
|
||||
add_library(mm_logo_screen
|
||||
|
@ -1,5 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(systems CXX)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(systems)
|
||||
|
||||
add_subdirectory(transform)
|
||||
add_subdirectory(simple_velocity)
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(fast_sky_sun_system CXX)
|
||||
|
||||
add_library(fast_sky_sun_system
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(player_velocity_system CXX)
|
||||
|
||||
add_library(player_velocity_system
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(simple_velocity_system CXX)
|
||||
|
||||
add_library(simple_velocity_system
|
||||
|
@ -1,4 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
project(transfrom_system CXX)
|
||||
|
||||
add_library(transform_system
|
||||
|
Loading…
Reference in New Issue
Block a user