mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 19:23:28 +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
|
# cmake setup begin
|
||||||
project(MushMachine C CXX)
|
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_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
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
|
# enable test
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||||
include(CTest)
|
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
|
# 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
|
add_library(imgui_color_text_edit
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/ImGuiColorTextEdit/TextEditor.h"
|
"${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)
|
project(SquirrelNoise)
|
||||||
|
|
||||||
add_library(squirrel_noise
|
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)
|
add_library(entt INTERFACE)
|
||||||
target_include_directories(entt INTERFACE "${CMAKE_CURRENT_LIST_DIR}/entt/src")
|
target_include_directories(entt INTERFACE "${CMAKE_CURRENT_LIST_DIR}/entt/src")
|
||||||
target_compile_features(entt INTERFACE cxx_std_17)
|
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)
|
project(glad C)
|
||||||
|
|
||||||
set(C_FILES
|
set(C_FILES
|
||||||
@ -15,8 +16,6 @@ add_library(glad ${C_FILES} ${H_FILES})
|
|||||||
target_include_directories(glad PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
target_include_directories(glad PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(glad
|
target_link_libraries(glad dl)
|
||||||
dl
|
|
||||||
)
|
|
||||||
endif()
|
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)
|
add_library(glm INTERFACE)
|
||||||
target_include_directories(glm INTERFACE "${CMAKE_CURRENT_LIST_DIR}/glm")
|
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)
|
add_library(icon_font_cpp_headers INTERFACE)
|
||||||
target_include_directories(icon_font_cpp_headers INTERFACE "${CMAKE_CURRENT_LIST_DIR}/IconFontCppHeaders/")
|
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
|
## 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
|
# compile, using preprocessor checks for platform-specific bits instead of
|
||||||
# testing in here.
|
# testing in here.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0.2)
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||||
|
|
||||||
project(PhysicsFS)
|
project(PhysicsFS)
|
||||||
set(PHYSFS_VERSION 3.1.0)
|
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)
|
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)
|
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)
|
if(NOT EMSCRIPTEN)
|
||||||
add_library(tracy_client
|
add_library(tracy_client
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||||
project(framework CXX)
|
|
||||||
|
project(framework)
|
||||||
|
|
||||||
add_subdirectory(engine)
|
add_subdirectory(engine)
|
||||||
add_subdirectory(logger)
|
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)
|
project(common_components CXX)
|
||||||
|
|
||||||
add_library(common_components INTERFACE)
|
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)
|
project(engine CXX)
|
||||||
|
|
||||||
add_library(engine
|
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)
|
project(filesystem_service CXX)
|
||||||
|
|
||||||
add_library(filesystem_service
|
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)
|
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)
|
project(input_service CXX)
|
||||||
|
|
||||||
add_library(input_service
|
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)
|
project(logger CXX)
|
||||||
|
|
||||||
file(GLOB_RECURSE CPP_FILES src/*.cpp)
|
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)
|
project(opengl_primitives CXX)
|
||||||
|
|
||||||
file(GLOB_RECURSE CPP_FILES src/*.cpp)
|
file(GLOB_RECURSE CPP_FILES src/*.cpp)
|
||||||
file(GLOB_RECURSE HPP_FILES src/*.hpp)
|
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")
|
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)
|
project(opengl_renderer CXX)
|
||||||
|
|
||||||
add_library(opengl_renderer_s
|
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)
|
project(organizer_scene CXX)
|
||||||
|
|
||||||
add_library(organizer_scene
|
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)
|
project(random CXX)
|
||||||
|
|
||||||
add_library(random
|
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)
|
project(resource_manager CXX)
|
||||||
|
|
||||||
add_library(resource_manager INTERFACE)
|
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)
|
project(screen_director CXX)
|
||||||
|
|
||||||
add_library(screen_director
|
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)
|
project(sdl_service CXX)
|
||||||
|
|
||||||
add_library(sdl_service
|
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)
|
project(simple_sdl_renderer_service CXX)
|
||||||
|
|
||||||
add_library(simple_sdl_renderer_service
|
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)
|
project(sound_service CXX)
|
||||||
|
|
||||||
add_library(sound_service
|
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)
|
project(std_utils CXX)
|
||||||
|
|
||||||
add_library(std_utils INTERFACE)
|
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)
|
project(tilemap CXX)
|
||||||
|
|
||||||
add_library(tilemap
|
add_library(tilemap
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||||
project(screens CXX)
|
|
||||||
|
project(screens)
|
||||||
|
|
||||||
if(NOT MM_HEADLESS)
|
if(NOT MM_HEADLESS)
|
||||||
add_subdirectory(mm_logo)
|
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)
|
project(mm_logo_screen CXX)
|
||||||
|
|
||||||
add_library(mm_logo_screen
|
add_library(mm_logo_screen
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||||
project(systems CXX)
|
|
||||||
|
project(systems)
|
||||||
|
|
||||||
add_subdirectory(transform)
|
add_subdirectory(transform)
|
||||||
add_subdirectory(simple_velocity)
|
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)
|
project(fast_sky_sun_system CXX)
|
||||||
|
|
||||||
add_library(fast_sky_sun_system
|
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)
|
project(player_velocity_system CXX)
|
||||||
|
|
||||||
add_library(player_velocity_system
|
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)
|
project(simple_velocity_system CXX)
|
||||||
|
|
||||||
add_library(simple_velocity_system
|
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)
|
project(transfrom_system CXX)
|
||||||
|
|
||||||
add_library(transform_system
|
add_library(transform_system
|
||||||
|
Loading…
Reference in New Issue
Block a user