diff --git a/CMakeLists.txt b/CMakeLists.txt index 4675c97..37edfe6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 81c6a60..aa4c6e9 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) # external libs diff --git a/external/ImGuiColorTextEdit.cmake b/external/ImGuiColorTextEdit.cmake index de10963..4b51890 100644 --- a/external/ImGuiColorTextEdit.cmake +++ b/external/ImGuiColorTextEdit.cmake @@ -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" diff --git a/external/SquirrelNoise/CMakeLists.txt b/external/SquirrelNoise/CMakeLists.txt index fa03da7..0d455c4 100644 --- a/external/SquirrelNoise/CMakeLists.txt +++ b/external/SquirrelNoise/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) + project(SquirrelNoise) add_library(squirrel_noise diff --git a/external/entt.cmake b/external/entt.cmake index f917f2c..7a55ed2 100644 --- a/external/entt.cmake +++ b/external/entt.cmake @@ -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) diff --git a/external/glad-debug/CMakeLists.txt b/external/glad-debug/CMakeLists.txt index c1ff085..36210ac 100644 --- a/external/glad-debug/CMakeLists.txt +++ b/external/glad-debug/CMakeLists.txt @@ -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() diff --git a/external/glm.cmake b/external/glm.cmake index 622490f..8eea6a4 100644 --- a/external/glm.cmake +++ b/external/glm.cmake @@ -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") diff --git a/external/icon_font_cpp_headers.cmake b/external/icon_font_cpp_headers.cmake index 609410e..47a6864 100644 --- a/external/icon_font_cpp_headers.cmake +++ b/external/icon_font_cpp_headers.cmake @@ -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/") diff --git a/external/json/CMakeLists.txt b/external/json/CMakeLists.txt index 5a129d6..85c2615 100644 --- a/external/json/CMakeLists.txt +++ b/external/json/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) ## ## PROJECT diff --git a/external/physfs/CMakeLists.txt b/external/physfs/CMakeLists.txt index 4997c80..e79e384 100644 --- a/external/physfs/CMakeLists.txt +++ b/external/physfs/CMakeLists.txt @@ -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) diff --git a/external/soloud/CMakeLists.txt b/external/soloud/CMakeLists.txt index 909dab6..e4cf347 100644 --- a/external/soloud/CMakeLists.txt +++ b/external/soloud/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) project(soloud CXX) diff --git a/external/stb/CMakeLists.txt b/external/stb/CMakeLists.txt index 0e0b1cd..f908fc7 100644 --- a/external/stb/CMakeLists.txt +++ b/external/stb/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) project(stb CXX) diff --git a/external/tracy/CMakeLists.txt b/external/tracy/CMakeLists.txt index eee3693..83e6a04 100644 --- a/external/tracy/CMakeLists.txt +++ b/external/tracy/CMakeLists.txt @@ -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 diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt index 63263f6..822919f 100644 --- a/framework/CMakeLists.txt +++ b/framework/CMakeLists.txt @@ -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) diff --git a/framework/common_components/CMakeLists.txt b/framework/common_components/CMakeLists.txt index 042709c..79b8a71 100644 --- a/framework/common_components/CMakeLists.txt +++ b/framework/common_components/CMakeLists.txt @@ -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) diff --git a/framework/engine/CMakeLists.txt b/framework/engine/CMakeLists.txt index 641acdc..91c3e08 100644 --- a/framework/engine/CMakeLists.txt +++ b/framework/engine/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) + project(engine CXX) add_library(engine diff --git a/framework/filesystem/CMakeLists.txt b/framework/filesystem/CMakeLists.txt index 4e26be7..e3eeac4 100644 --- a/framework/filesystem/CMakeLists.txt +++ b/framework/filesystem/CMakeLists.txt @@ -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 diff --git a/framework/imgui/CMakeLists.txt b/framework/imgui/CMakeLists.txt index 7280d45..204e88b 100644 --- a/framework/imgui/CMakeLists.txt +++ b/framework/imgui/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) project(imgui_lib CXX) diff --git a/framework/input/CMakeLists.txt b/framework/input/CMakeLists.txt index ed9c5ba..fabf47e 100644 --- a/framework/input/CMakeLists.txt +++ b/framework/input/CMakeLists.txt @@ -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 diff --git a/framework/logger/CMakeLists.txt b/framework/logger/CMakeLists.txt index b6011bd..4b4b827 100644 --- a/framework/logger/CMakeLists.txt +++ b/framework/logger/CMakeLists.txt @@ -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) diff --git a/framework/opengl_primitives/CMakeLists.txt b/framework/opengl_primitives/CMakeLists.txt index c858e92..5e43a5d 100644 --- a/framework/opengl_primitives/CMakeLists.txt +++ b/framework/opengl_primitives/CMakeLists.txt @@ -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") diff --git a/framework/opengl_renderer/CMakeLists.txt b/framework/opengl_renderer/CMakeLists.txt index f9a2eb3..92d413f 100644 --- a/framework/opengl_renderer/CMakeLists.txt +++ b/framework/opengl_renderer/CMakeLists.txt @@ -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 diff --git a/framework/organizer_scene/CMakeLists.txt b/framework/organizer_scene/CMakeLists.txt index 32e18d0..ce36c7a 100644 --- a/framework/organizer_scene/CMakeLists.txt +++ b/framework/organizer_scene/CMakeLists.txt @@ -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 diff --git a/framework/random/CMakeLists.txt b/framework/random/CMakeLists.txt index d954586..e081ecf 100644 --- a/framework/random/CMakeLists.txt +++ b/framework/random/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) + project(random CXX) add_library(random diff --git a/framework/resource_manager/CMakeLists.txt b/framework/resource_manager/CMakeLists.txt index 107afa4..dece6ee 100644 --- a/framework/resource_manager/CMakeLists.txt +++ b/framework/resource_manager/CMakeLists.txt @@ -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) diff --git a/framework/screen_director/CMakeLists.txt b/framework/screen_director/CMakeLists.txt index c3a20b7..c497541 100644 --- a/framework/screen_director/CMakeLists.txt +++ b/framework/screen_director/CMakeLists.txt @@ -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 diff --git a/framework/sdl_service/CMakeLists.txt b/framework/sdl_service/CMakeLists.txt index 3e1584e..4ca7020 100644 --- a/framework/sdl_service/CMakeLists.txt +++ b/framework/sdl_service/CMakeLists.txt @@ -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 diff --git a/framework/simple_sdl_renderer/CMakeLists.txt b/framework/simple_sdl_renderer/CMakeLists.txt index 7c83541..c3612f7 100644 --- a/framework/simple_sdl_renderer/CMakeLists.txt +++ b/framework/simple_sdl_renderer/CMakeLists.txt @@ -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 diff --git a/framework/sound/CMakeLists.txt b/framework/sound/CMakeLists.txt index 9f85171..f90377d 100644 --- a/framework/sound/CMakeLists.txt +++ b/framework/sound/CMakeLists.txt @@ -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 diff --git a/framework/std_utils/CMakeLists.txt b/framework/std_utils/CMakeLists.txt index 1570ae5..0f00c2f 100644 --- a/framework/std_utils/CMakeLists.txt +++ b/framework/std_utils/CMakeLists.txt @@ -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) diff --git a/framework/tilemap/CMakeLists.txt b/framework/tilemap/CMakeLists.txt index 42e9af4..2cb2e2c 100644 --- a/framework/tilemap/CMakeLists.txt +++ b/framework/tilemap/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.9 FATAL_ERROR) + project(tilemap CXX) add_library(tilemap diff --git a/screens/CMakeLists.txt b/screens/CMakeLists.txt index 2db0498..029cb71 100644 --- a/screens/CMakeLists.txt +++ b/screens/CMakeLists.txt @@ -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) diff --git a/screens/mm_logo/CMakeLists.txt b/screens/mm_logo/CMakeLists.txt index 6aea6ee..e85c466 100644 --- a/screens/mm_logo/CMakeLists.txt +++ b/screens/mm_logo/CMakeLists.txt @@ -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 diff --git a/systems/CMakeLists.txt b/systems/CMakeLists.txt index 77735f7..b11386f 100644 --- a/systems/CMakeLists.txt +++ b/systems/CMakeLists.txt @@ -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) diff --git a/systems/fast_sky_sun/CMakeLists.txt b/systems/fast_sky_sun/CMakeLists.txt index 03ad879..692dbb9 100644 --- a/systems/fast_sky_sun/CMakeLists.txt +++ b/systems/fast_sky_sun/CMakeLists.txt @@ -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 diff --git a/systems/player_velocity/CMakeLists.txt b/systems/player_velocity/CMakeLists.txt index 36be4fb..d7aaf25 100644 --- a/systems/player_velocity/CMakeLists.txt +++ b/systems/player_velocity/CMakeLists.txt @@ -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 diff --git a/systems/simple_velocity/CMakeLists.txt b/systems/simple_velocity/CMakeLists.txt index f331050..002b0a6 100644 --- a/systems/simple_velocity/CMakeLists.txt +++ b/systems/simple_velocity/CMakeLists.txt @@ -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 diff --git a/systems/transform/CMakeLists.txt b/systems/transform/CMakeLists.txt index 918d4ef..98d9ed3 100644 --- a/systems/transform/CMakeLists.txt +++ b/systems/transform/CMakeLists.txt @@ -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