From 086a2ca39f9a569273ce47b4957494ec2a59c21e Mon Sep 17 00:00:00 2001 From: maelstrom Date: Wed, 12 Mar 2025 22:47:59 +0100 Subject: [PATCH] chore: remove unused dependencies --- CMakeLists.txt | 2 +- client/CMakeLists.txt | 5 ++++- core/CMakeLists.txt | 9 +-------- deps.txt | 9 ++++----- editor/CMakeLists.txt | 6 +++--- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47369e8..d211967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.0) +cmake_minimum_required(VERSION 3.31..) set(CMAKE_CXX_STANDARD 17) project(openblocks VERSION 0.1.0) set(OpenGL_GL_PREFERENCE "GLVND") diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 72e321b..876454c 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,4 +1,7 @@ +find_package(SDL2 REQUIRED) +include_directories(${SDL2_INCLUDE_DIRS}) + find_package(glfw3 REQUIRED) add_executable(client "src/main.cpp") -target_link_libraries(client PRIVATE openblocks glfw) \ No newline at end of file +target_link_libraries(client PRIVATE ${SDL2_LIBRARIES} openblocks glfw) \ No newline at end of file diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 6917d66..0166e5f 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -1,22 +1,15 @@ find_package(OpenGL REQUIRED COMPONENTS OpenGL) -find_package(SDL2 REQUIRED) -include_directories(${SDL2_INCLUDE_DIRS}) - find_package(GLEW REQUIRED) include_directories(${GLEW_INCLUDE_DIRS}) -find_package(GLUT REQUIRED) -include_directories(${GLUT_INCLUDE_DIRS}) - find_package(OpenGL) find_package(glm CONFIG REQUIRED) -# find_package(assimp REQUIRED) find_package(ReactPhysics3D REQUIRED) find_package(pugixml REQUIRED) file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.h") add_library(openblocks ${SOURCES}) set_target_properties(openblocks PROPERTIES OUTPUT_NAME "openblocks") -target_link_libraries(openblocks ${SDL2_LIBRARIES} ${GLEW_LIBRARIES} ${GLUT_LIBRARIES} OpenGL::GL OpenGL::GLU ReactPhysics3D::ReactPhysics3D pugixml::pugixml) +target_link_libraries(openblocks ${GLEW_LIBRARIES} OpenGL::GL ReactPhysics3D::ReactPhysics3D pugixml::pugixml) target_include_directories(openblocks PUBLIC "src" "../include") \ No newline at end of file diff --git a/deps.txt b/deps.txt index 7d9107e..98f7c4a 100644 --- a/deps.txt +++ b/deps.txt @@ -1,10 +1,9 @@ -glm -opengl -assimp -sdl2 +opengl (Linux: glvnd, Windows: [built-in/none]) glfw -glut glew +glm +sdl2 +stb qt6 reactphysics3d pugixml \ No newline at end of file diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index 617be11..12afd42 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.31..) project(editor VERSION 0.1 LANGUAGES CXX) @@ -14,8 +14,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools) - - set(TS_FILES editor_en_US.ts) set(PROJECT_SOURCES @@ -98,6 +96,8 @@ install(TARGETS editor RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) +install(FILES $ TYPE BIN) + if(QT_VERSION_MAJOR EQUAL 6) qt_finalize_executable(editor) endif() \ No newline at end of file