diff --git a/CMakeLists.txt b/CMakeLists.txt index 5986ef7e..28a16df9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,11 +184,12 @@ ADD_SUBDIRECTORY(3rdparty) ADD_SUBDIRECTORY(src) # Unit Tests -#ADD_SUBDIRECTORY(test) - +IF (NOT OSP_BUILD_GDEXTENSION) + ADD_SUBDIRECTORY(test) +ENDIF() # Set OSP as default startup project in Visual Studio set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT osp-magnum) # Set execution directory of osp-magnum so that we don't have to copy the files -if (OSP_BUILD_GDEXTENSION EQUAL OFF) +if (NOT OSP_BUILD_GDEXTENSION) set_property(TARGET osp-magnum PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/bin") endif() \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 078abedf..23a98a85 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -25,8 +25,19 @@ # TODO put that in the right place. +set(THREADS_PREFER_PTHREAD_FLAG TRUE) +find_package(Threads) +if(NOT Threads_FOUND) + message(FATAL_ERROR "Can't find a thread library to use!") +endif() + +#compile as position-independant to avoid link errors on static link +add_compile_options("-fPIC") -add_subdirectory(common) +add_subdirectory(adera) +add_subdirectory(osp) +add_subdirectory(planet-a) +add_subdirectory(ospjolt) if(OSP_BUILD_GDEXTENSION) @@ -34,7 +45,9 @@ add_subdirectory(gdextension) else() -add_subdirectory(standalone) +add_subdirectory(testapp) +add_subdirectory(osp_drawing_gl) +add_subdirectory(adera_drawing_gl) endif() diff --git a/src/adera/CMakeLists.txt b/src/adera/CMakeLists.txt new file mode 100644 index 00000000..95f1e693 --- /dev/null +++ b/src/adera/CMakeLists.txt @@ -0,0 +1,57 @@ +## +# Open Space Program +# Copyright © 2019-2024 Open Space Program Project +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +## + +find_package(Magnum REQUIRED + Trade + AnyImageImporter + ) + +find_package(MagnumPlugins REQUIRED + TinyGltfImporter + StbImageImporter) + +SET(DEPS_LIBS + EnTT::EnTT + Corrade::Main + Magnum::Magnum + Magnum::Trade + longeron + spdlog + OpenSpaceProgram) + +add_library(Adera STATIC) + +target_compile_features(Adera PUBLIC cxx_std_20) + +# Link it to the interface library that describes the dependencies +target_link_libraries(Adera PRIVATE ${DEPS_LIBS}) + +# Gather paths to OSP headers and sources +file(GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS *.cpp) +file(GLOB_RECURSE H_FILES CONFIGURE_DEPENDS *.h) +target_sources(Adera PRIVATE "${CPP_FILES}" "${H_FILES}") + +# Enforce conformance mode for adera +target_compile_options(Adera PRIVATE $<$:/permissive->) \ No newline at end of file diff --git a/src/common/adera/Plume.h b/src/adera/Plume.h similarity index 100% rename from src/common/adera/Plume.h rename to src/adera/Plume.h diff --git a/src/common/adera/ShipResources.h b/src/adera/ShipResources.h similarity index 100% rename from src/common/adera/ShipResources.h rename to src/adera/ShipResources.h diff --git a/src/common/adera/SysExhaustPlume.cpp b/src/adera/SysExhaustPlume.cpp similarity index 100% rename from src/common/adera/SysExhaustPlume.cpp rename to src/adera/SysExhaustPlume.cpp diff --git a/src/common/adera/SysExhaustPlume.h b/src/adera/SysExhaustPlume.h similarity index 100% rename from src/common/adera/SysExhaustPlume.h rename to src/adera/SysExhaustPlume.h diff --git a/src/common/adera/activescene/VehicleBuilder.cpp b/src/adera/activescene/VehicleBuilder.cpp similarity index 100% rename from src/common/adera/activescene/VehicleBuilder.cpp rename to src/adera/activescene/VehicleBuilder.cpp diff --git a/src/common/adera/activescene/VehicleBuilder.h b/src/adera/activescene/VehicleBuilder.h similarity index 100% rename from src/common/adera/activescene/VehicleBuilder.h rename to src/adera/activescene/VehicleBuilder.h diff --git a/src/common/adera/activescene/vehicles_vb_fn.cpp b/src/adera/activescene/vehicles_vb_fn.cpp similarity index 100% rename from src/common/adera/activescene/vehicles_vb_fn.cpp rename to src/adera/activescene/vehicles_vb_fn.cpp diff --git a/src/common/adera/activescene/vehicles_vb_fn.h b/src/adera/activescene/vehicles_vb_fn.h similarity index 100% rename from src/common/adera/activescene/vehicles_vb_fn.h rename to src/adera/activescene/vehicles_vb_fn.h diff --git a/src/common/adera/drawing/CameraController.cpp b/src/adera/drawing/CameraController.cpp similarity index 100% rename from src/common/adera/drawing/CameraController.cpp rename to src/adera/drawing/CameraController.cpp diff --git a/src/common/adera/drawing/CameraController.h b/src/adera/drawing/CameraController.h similarity index 100% rename from src/common/adera/drawing/CameraController.h rename to src/adera/drawing/CameraController.h diff --git a/src/common/adera/machines/links.cpp b/src/adera/machines/links.cpp similarity index 100% rename from src/common/adera/machines/links.cpp rename to src/adera/machines/links.cpp diff --git a/src/common/adera/machines/links.h b/src/adera/machines/links.h similarity index 100% rename from src/common/adera/machines/links.h rename to src/adera/machines/links.h diff --git a/src/adera_drawing_gl/CMakeLists.txt b/src/adera_drawing_gl/CMakeLists.txt new file mode 100644 index 00000000..31a6da07 --- /dev/null +++ b/src/adera_drawing_gl/CMakeLists.txt @@ -0,0 +1,59 @@ +## +# Open Space Program +# Copyright © 2019-2024 Open Space Program Project +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +## + +find_package(Magnum REQUIRED + GL + Shaders + MeshTools + Primitives + Trade + ) + +SET(DEPS_LIBS + Corrade::Main + Magnum::GL + Magnum::Magnum + Magnum::MeshTools + Magnum::Primitives + Magnum::Shaders + Magnum::Trade + OpenSpaceProgram + longeron + OspGL) + +add_library(AderaGL STATIC) + +target_compile_features(AderaGL PUBLIC cxx_std_20) + +# Link it to the interface library that describes the dependencies +target_link_libraries(AderaGL PRIVATE ${DEPS_LIBS}) + +# Gather paths to OSP headers and sources +file(GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS *.cpp) +file(GLOB_RECURSE H_FILES CONFIGURE_DEPENDS *.h) +target_sources(AderaGL PRIVATE "${CPP_FILES}" "${H_FILES}") + +# Enforce conformance mode for adera +target_compile_options(AderaGL PRIVATE $<$:/permissive->) \ No newline at end of file diff --git a/src/standalone/shader/flat_shader.cpp b/src/adera_drawing_gl/flat_shader.cpp similarity index 100% rename from src/standalone/shader/flat_shader.cpp rename to src/adera_drawing_gl/flat_shader.cpp diff --git a/src/standalone/shader/flat_shader.h b/src/adera_drawing_gl/flat_shader.h similarity index 99% rename from src/standalone/shader/flat_shader.h rename to src/adera_drawing_gl/flat_shader.h index 122f4017..96827379 100644 --- a/src/standalone/shader/flat_shader.h +++ b/src/adera_drawing_gl/flat_shader.h @@ -24,7 +24,7 @@ */ #pragma once -#include +#include #include diff --git a/src/standalone/shader/phong_shader.cpp b/src/adera_drawing_gl/phong_shader.cpp similarity index 100% rename from src/standalone/shader/phong_shader.cpp rename to src/adera_drawing_gl/phong_shader.cpp diff --git a/src/standalone/shader/phong_shader.h b/src/adera_drawing_gl/phong_shader.h similarity index 99% rename from src/standalone/shader/phong_shader.h rename to src/adera_drawing_gl/phong_shader.h index 540aa125..e849e7ba 100644 --- a/src/standalone/shader/phong_shader.h +++ b/src/adera_drawing_gl/phong_shader.h @@ -24,7 +24,7 @@ */ #pragma once -#include +#include #include diff --git a/src/standalone/shader/plume_shader.cpp b/src/adera_drawing_gl/plume_shader.cpp similarity index 100% rename from src/standalone/shader/plume_shader.cpp rename to src/adera_drawing_gl/plume_shader.cpp diff --git a/src/standalone/shader/plume_shader.h b/src/adera_drawing_gl/plume_shader.h similarity index 100% rename from src/standalone/shader/plume_shader.h rename to src/adera_drawing_gl/plume_shader.h diff --git a/src/standalone/shader/visualizer_shader.cpp b/src/adera_drawing_gl/visualizer_shader.cpp similarity index 100% rename from src/standalone/shader/visualizer_shader.cpp rename to src/adera_drawing_gl/visualizer_shader.cpp diff --git a/src/standalone/shader/visualizer_shader.h b/src/adera_drawing_gl/visualizer_shader.h similarity index 98% rename from src/standalone/shader/visualizer_shader.h rename to src/adera_drawing_gl/visualizer_shader.h index fcc2c9b1..8eaa3c8f 100644 --- a/src/standalone/shader/visualizer_shader.h +++ b/src/adera_drawing_gl/visualizer_shader.h @@ -24,7 +24,7 @@ */ #pragma once -#include +#include #include diff --git a/src/gdextension/CMakeLists.txt b/src/gdextension/CMakeLists.txt index fc223a7b..d3475b64 100644 --- a/src/gdextension/CMakeLists.txt +++ b/src/gdextension/CMakeLists.txt @@ -56,7 +56,7 @@ target_sources(osp-gdextension PRIVATE "${CPP_FILES}" "${H_FILES}") target_include_directories(osp-gdextension PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(osp-gdextension PRIVATE godot-cpp osp-common) +target_link_libraries(osp-gdextension PRIVATE godot-cpp OpenSpaceProgram Adera PlanetA OspJolt) target_compile_options(osp-gdextension PRIVATE "-static") diff --git a/src/gdextension/Example.cpp b/src/gdextension/Example.cpp index fb302100..2cf4586b 100644 --- a/src/gdextension/Example.cpp +++ b/src/gdextension/Example.cpp @@ -4,7 +4,7 @@ #include "godot_cpp/classes/label.hpp" #include "godot_cpp/core/class_db.hpp" #include "godot_cpp/variant/utility_functions.hpp" -#include "ospjolt/activescene/joltinteg.h" +#include "ospjolt/joltinteg.h" #include "Example.h" diff --git a/src/osp/CMakeLists.txt b/src/osp/CMakeLists.txt new file mode 100644 index 00000000..2faa6b23 --- /dev/null +++ b/src/osp/CMakeLists.txt @@ -0,0 +1,63 @@ +## +# Open Space Program +# Copyright © 2019-2024 Open Space Program Project +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +## + +find_package(Magnum REQUIRED + Trade + AnyImageImporter + ) + +find_package(MagnumPlugins REQUIRED + TinyGltfImporter + StbImageImporter) + +SET(OSP_DEPS_LIBS + Threads::Threads + EnTT::EnTT + Corrade::Main + Magnum::Magnum + Magnum::Trade + Magnum::AnyImageImporter + MagnumPlugins::TinyGltfImporter + MagnumPlugins::StbImageImporter + toml11 + spdlog + longeron) + +add_library(OpenSpaceProgram STATIC) + +target_compile_features(OpenSpaceProgram PUBLIC cxx_std_20) + +target_include_directories(OpenSpaceProgram PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..") + +# Link it to the interface library that describes the dependencies +target_link_libraries(OpenSpaceProgram PUBLIC ${OSP_DEPS_LIBS}) + +# Gather paths to OSP headers and sources +file(GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS *.cpp) +file(GLOB_RECURSE H_FILES CONFIGURE_DEPENDS *.h) +target_sources(OpenSpaceProgram PRIVATE "${CPP_FILES}" "${H_FILES}") + +# Enforce conformance mode for osp-magnum +target_compile_options(OpenSpaceProgram PRIVATE $<$:/permissive->) \ No newline at end of file diff --git a/src/common/osp/activescene/active_ent.h b/src/osp/activescene/active_ent.h similarity index 100% rename from src/common/osp/activescene/active_ent.h rename to src/osp/activescene/active_ent.h diff --git a/src/common/osp/activescene/basic.h b/src/osp/activescene/basic.h similarity index 100% rename from src/common/osp/activescene/basic.h rename to src/osp/activescene/basic.h diff --git a/src/common/osp/activescene/basic_fn.cpp b/src/osp/activescene/basic_fn.cpp similarity index 100% rename from src/common/osp/activescene/basic_fn.cpp rename to src/osp/activescene/basic_fn.cpp diff --git a/src/common/osp/activescene/basic_fn.h b/src/osp/activescene/basic_fn.h similarity index 100% rename from src/common/osp/activescene/basic_fn.h rename to src/osp/activescene/basic_fn.h diff --git a/src/common/osp/activescene/physics.h b/src/osp/activescene/physics.h similarity index 100% rename from src/common/osp/activescene/physics.h rename to src/osp/activescene/physics.h diff --git a/src/common/osp/activescene/physics_fn.cpp b/src/osp/activescene/physics_fn.cpp similarity index 100% rename from src/common/osp/activescene/physics_fn.cpp rename to src/osp/activescene/physics_fn.cpp diff --git a/src/common/osp/activescene/physics_fn.h b/src/osp/activescene/physics_fn.h similarity index 100% rename from src/common/osp/activescene/physics_fn.h rename to src/osp/activescene/physics_fn.h diff --git a/src/common/osp/activescene/prefab_fn.cpp b/src/osp/activescene/prefab_fn.cpp similarity index 100% rename from src/common/osp/activescene/prefab_fn.cpp rename to src/osp/activescene/prefab_fn.cpp diff --git a/src/common/osp/activescene/prefab_fn.h b/src/osp/activescene/prefab_fn.h similarity index 100% rename from src/common/osp/activescene/prefab_fn.h rename to src/osp/activescene/prefab_fn.h diff --git a/src/common/osp/activescene/vehicles.h b/src/osp/activescene/vehicles.h similarity index 100% rename from src/common/osp/activescene/vehicles.h rename to src/osp/activescene/vehicles.h diff --git a/src/common/osp/core/Resources.cpp b/src/osp/core/Resources.cpp similarity index 100% rename from src/common/osp/core/Resources.cpp rename to src/osp/core/Resources.cpp diff --git a/src/common/osp/core/Resources.h b/src/osp/core/Resources.h similarity index 100% rename from src/common/osp/core/Resources.h rename to src/osp/core/Resources.h diff --git a/src/common/osp/core/array_view.h b/src/osp/core/array_view.h similarity index 100% rename from src/common/osp/core/array_view.h rename to src/osp/core/array_view.h diff --git a/src/common/osp/core/bitvector.h b/src/osp/core/bitvector.h similarity index 100% rename from src/common/osp/core/bitvector.h rename to src/osp/core/bitvector.h diff --git a/src/common/osp/core/copymove_macros.h b/src/osp/core/copymove_macros.h similarity index 100% rename from src/common/osp/core/copymove_macros.h rename to src/osp/core/copymove_macros.h diff --git a/src/common/osp/core/global_id.h b/src/osp/core/global_id.h similarity index 100% rename from src/common/osp/core/global_id.h rename to src/osp/core/global_id.h diff --git a/src/common/osp/core/id_map.h b/src/osp/core/id_map.h similarity index 100% rename from src/common/osp/core/id_map.h rename to src/osp/core/id_map.h diff --git a/src/common/osp/core/id_utils.h b/src/osp/core/id_utils.h similarity index 100% rename from src/common/osp/core/id_utils.h rename to src/osp/core/id_utils.h diff --git a/src/common/osp/core/keyed_vector.h b/src/osp/core/keyed_vector.h similarity index 100% rename from src/common/osp/core/keyed_vector.h rename to src/osp/core/keyed_vector.h diff --git a/src/common/osp/core/math_2pow.h b/src/osp/core/math_2pow.h similarity index 100% rename from src/common/osp/core/math_2pow.h rename to src/osp/core/math_2pow.h diff --git a/src/common/osp/core/math_int64.h b/src/osp/core/math_int64.h similarity index 100% rename from src/common/osp/core/math_int64.h rename to src/osp/core/math_int64.h diff --git a/src/common/osp/core/math_types.h b/src/osp/core/math_types.h similarity index 100% rename from src/common/osp/core/math_types.h rename to src/osp/core/math_types.h diff --git a/src/common/osp/core/resourcetypes.h b/src/osp/core/resourcetypes.h similarity index 100% rename from src/common/osp/core/resourcetypes.h rename to src/osp/core/resourcetypes.h diff --git a/src/common/osp/core/shared_string.h b/src/osp/core/shared_string.h similarity index 100% rename from src/common/osp/core/shared_string.h rename to src/osp/core/shared_string.h diff --git a/src/common/osp/core/storage.h b/src/osp/core/storage.h similarity index 100% rename from src/common/osp/core/storage.h rename to src/osp/core/storage.h diff --git a/src/common/osp/core/string_concat.h b/src/osp/core/string_concat.h similarity index 100% rename from src/common/osp/core/string_concat.h rename to src/osp/core/string_concat.h diff --git a/src/common/osp/core/strong_id.h b/src/osp/core/strong_id.h similarity index 100% rename from src/common/osp/core/strong_id.h rename to src/osp/core/strong_id.h diff --git a/src/common/osp/core/unpack.h b/src/osp/core/unpack.h similarity index 100% rename from src/common/osp/core/unpack.h rename to src/osp/core/unpack.h diff --git a/src/common/osp/drawing/draw_ent.h b/src/osp/drawing/draw_ent.h similarity index 100% rename from src/common/osp/drawing/draw_ent.h rename to src/osp/drawing/draw_ent.h diff --git a/src/common/osp/drawing/drawing.h b/src/osp/drawing/drawing.h similarity index 100% rename from src/common/osp/drawing/drawing.h rename to src/osp/drawing/drawing.h diff --git a/src/common/osp/drawing/drawing_fn.cpp b/src/osp/drawing/drawing_fn.cpp similarity index 100% rename from src/common/osp/drawing/drawing_fn.cpp rename to src/osp/drawing/drawing_fn.cpp diff --git a/src/common/osp/drawing/drawing_fn.h b/src/osp/drawing/drawing_fn.h similarity index 100% rename from src/common/osp/drawing/drawing_fn.h rename to src/osp/drawing/drawing_fn.h diff --git a/src/common/osp/drawing/own_restypes.h b/src/osp/drawing/own_restypes.h similarity index 100% rename from src/common/osp/drawing/own_restypes.h rename to src/osp/drawing/own_restypes.h diff --git a/src/common/osp/drawing/prefab_draw.cpp b/src/osp/drawing/prefab_draw.cpp similarity index 100% rename from src/common/osp/drawing/prefab_draw.cpp rename to src/osp/drawing/prefab_draw.cpp diff --git a/src/common/osp/drawing/prefab_draw.h b/src/osp/drawing/prefab_draw.h similarity index 100% rename from src/common/osp/drawing/prefab_draw.h rename to src/osp/drawing/prefab_draw.h diff --git a/src/common/osp/link/machines.cpp b/src/osp/link/machines.cpp similarity index 100% rename from src/common/osp/link/machines.cpp rename to src/osp/link/machines.cpp diff --git a/src/common/osp/link/machines.h b/src/osp/link/machines.h similarity index 100% rename from src/common/osp/link/machines.h rename to src/osp/link/machines.h diff --git a/src/common/osp/link/signal.h b/src/osp/link/signal.h similarity index 100% rename from src/common/osp/link/signal.h rename to src/osp/link/signal.h diff --git a/src/common/osp/scientific/constants.h b/src/osp/scientific/constants.h similarity index 100% rename from src/common/osp/scientific/constants.h rename to src/osp/scientific/constants.h diff --git a/src/common/osp/scientific/shapes.cpp b/src/osp/scientific/shapes.cpp similarity index 100% rename from src/common/osp/scientific/shapes.cpp rename to src/osp/scientific/shapes.cpp diff --git a/src/common/osp/scientific/shapes.h b/src/osp/scientific/shapes.h similarity index 100% rename from src/common/osp/scientific/shapes.h rename to src/osp/scientific/shapes.h diff --git a/src/common/osp/tasks/builder.h b/src/osp/tasks/builder.h similarity index 100% rename from src/common/osp/tasks/builder.h rename to src/osp/tasks/builder.h diff --git a/src/common/osp/tasks/execute.cpp b/src/osp/tasks/execute.cpp similarity index 100% rename from src/common/osp/tasks/execute.cpp rename to src/osp/tasks/execute.cpp diff --git a/src/common/osp/tasks/execute.h b/src/osp/tasks/execute.h similarity index 100% rename from src/common/osp/tasks/execute.h rename to src/osp/tasks/execute.h diff --git a/src/common/osp/tasks/tasks.cpp b/src/osp/tasks/tasks.cpp similarity index 100% rename from src/common/osp/tasks/tasks.cpp rename to src/osp/tasks/tasks.cpp diff --git a/src/common/osp/tasks/tasks.h b/src/osp/tasks/tasks.h similarity index 100% rename from src/common/osp/tasks/tasks.h rename to src/osp/tasks/tasks.h diff --git a/src/common/osp/tasks/top_execute.cpp b/src/osp/tasks/top_execute.cpp similarity index 100% rename from src/common/osp/tasks/top_execute.cpp rename to src/osp/tasks/top_execute.cpp diff --git a/src/common/osp/tasks/top_execute.h b/src/osp/tasks/top_execute.h similarity index 100% rename from src/common/osp/tasks/top_execute.h rename to src/osp/tasks/top_execute.h diff --git a/src/common/osp/tasks/top_session.h b/src/osp/tasks/top_session.h similarity index 100% rename from src/common/osp/tasks/top_session.h rename to src/osp/tasks/top_session.h diff --git a/src/common/osp/tasks/top_tasks.h b/src/osp/tasks/top_tasks.h similarity index 100% rename from src/common/osp/tasks/top_tasks.h rename to src/osp/tasks/top_tasks.h diff --git a/src/common/osp/tasks/top_utils.h b/src/osp/tasks/top_utils.h similarity index 100% rename from src/common/osp/tasks/top_utils.h rename to src/osp/tasks/top_utils.h diff --git a/src/common/osp/tasks/top_worker.h b/src/osp/tasks/top_worker.h similarity index 100% rename from src/common/osp/tasks/top_worker.h rename to src/osp/tasks/top_worker.h diff --git a/src/common/osp/tasks/worker.h b/src/osp/tasks/worker.h similarity index 100% rename from src/common/osp/tasks/worker.h rename to src/osp/tasks/worker.h diff --git a/src/common/osp/universe/coordinates.h b/src/osp/universe/coordinates.h similarity index 100% rename from src/common/osp/universe/coordinates.h rename to src/osp/universe/coordinates.h diff --git a/src/common/osp/universe/universe.h b/src/osp/universe/universe.h similarity index 100% rename from src/common/osp/universe/universe.h rename to src/osp/universe/universe.h diff --git a/src/common/osp/universe/universetypes.h b/src/osp/universe/universetypes.h similarity index 100% rename from src/common/osp/universe/universetypes.h rename to src/osp/universe/universetypes.h diff --git a/src/common/osp/util/UserInputHandler.cpp b/src/osp/util/UserInputHandler.cpp similarity index 100% rename from src/common/osp/util/UserInputHandler.cpp rename to src/osp/util/UserInputHandler.cpp diff --git a/src/common/osp/util/UserInputHandler.h b/src/osp/util/UserInputHandler.h similarity index 100% rename from src/common/osp/util/UserInputHandler.h rename to src/osp/util/UserInputHandler.h diff --git a/src/common/osp/util/logging.h b/src/osp/util/logging.h similarity index 100% rename from src/common/osp/util/logging.h rename to src/osp/util/logging.h diff --git a/src/common/osp/vehicles/ImporterData.h b/src/osp/vehicles/ImporterData.h similarity index 100% rename from src/common/osp/vehicles/ImporterData.h rename to src/osp/vehicles/ImporterData.h diff --git a/src/common/osp/vehicles/blueprints.h b/src/osp/vehicles/blueprints.h similarity index 100% rename from src/common/osp/vehicles/blueprints.h rename to src/osp/vehicles/blueprints.h diff --git a/src/common/osp/vehicles/load_tinygltf.cpp b/src/osp/vehicles/load_tinygltf.cpp similarity index 100% rename from src/common/osp/vehicles/load_tinygltf.cpp rename to src/osp/vehicles/load_tinygltf.cpp diff --git a/src/common/osp/vehicles/load_tinygltf.h b/src/osp/vehicles/load_tinygltf.h similarity index 100% rename from src/common/osp/vehicles/load_tinygltf.h rename to src/osp/vehicles/load_tinygltf.h diff --git a/src/common/osp/vehicles/prefabs.h b/src/osp/vehicles/prefabs.h similarity index 100% rename from src/common/osp/vehicles/prefabs.h rename to src/osp/vehicles/prefabs.h diff --git a/src/common/CMakeLists.txt b/src/osp_drawing_gl/CMakeLists.txt similarity index 56% rename from src/common/CMakeLists.txt rename to src/osp_drawing_gl/CMakeLists.txt index 516baeaa..3e3c2698 100644 --- a/src/common/CMakeLists.txt +++ b/src/osp_drawing_gl/CMakeLists.txt @@ -22,14 +22,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. ## -set(THREADS_PREFER_PTHREAD_FLAG TRUE) -find_package(Threads) -if(NOT Threads_FOUND) - message(FATAL_ERROR "Can't find a thread library to use!") -endif() find_package(Magnum REQUIRED + GL + Shaders MeshTools + Primitives Trade AnyImageImporter ) @@ -38,55 +36,55 @@ find_package(MagnumPlugins REQUIRED TinyGltfImporter StbImageImporter) -add_library(osp-common-deps INTERFACE) -add_custom_target(compile-osp-common-deps) - -# TODO: This list shouldn't be required, but there appears to be a bug in cmake where -# the add_custom_target() command, pointing to an INTERFACE dependency, doesn't -# result in the dependencies of the interface building. -# See: https://gitlab.kitware.com/cmake/cmake/-/issues/23569 -SET(OSP_COMMON_DEPS_LIBS +SET(DEPS_LIBS Threads::Threads EnTT::EnTT Corrade::Main + Magnum::GL Magnum::Magnum + Magnum::MeshTools + Magnum::Primitives + Magnum::Shaders Magnum::Trade Magnum::AnyImageImporter MagnumPlugins::TinyGltfImporter MagnumPlugins::StbImageImporter - toml11 - spdlog longeron - Jolt) -target_link_libraries(osp-common-deps INTERFACE ${OSP_COMMON_DEPS_LIBS}) -add_dependencies(compile-osp-common-deps ${OSP_COMMON_DEPS_LIBS}) - -add_library(osp-common STATIC) + OpenSpaceProgram) -target_compile_options(osp-common PRIVATE "-fPIC") -target_compile_features(osp-common PUBLIC cxx_std_20) +add_library(OspGL STATIC) -target_include_directories(osp-common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_compile_features(OspGL PUBLIC cxx_std_20) # Link it to the interface library that describes the dependencies -target_link_libraries(osp-common PUBLIC osp-common-deps) +target_link_libraries(OspGL PRIVATE ${DEPS_LIBS}) # Gather paths to OSP headers and sources file(GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS *.cpp) file(GLOB_RECURSE H_FILES CONFIGURE_DEPENDS *.h) -target_sources(osp-common PRIVATE "${CPP_FILES}" "${H_FILES}") +target_sources(OspGL PRIVATE "${CPP_FILES}" "${H_FILES}") + +# Add shaders to IDE project +set(SHADERS_DIR "../../bin/OSPData/adera/Shaders") +file (GLOB_RECURSE SHADER_FILES CONFIGURE_DEPENDS + "${SHADERS_DIR}/*.vert" + "${SHADERS_DIR}/*.frag" + "${SHADERS_DIR}/*.comp" +) +# For some reason, source_group() requires all files to be added to the executable +target_sources(OspGL PRIVATE "${SHADER_FILES}") -# Segregate headers into filters +# Segregate headers, shaders into filters +source_group("Shader Files" FILES ${SHADER_FILES}) source_group("Header Files" FILES ${H_FILES}) -# Enforce conformance mode for osp-common -target_compile_options(osp-common PRIVATE $<$:/permissive->) +# Enforce conformance mode for OspGL +target_compile_options(OspGL PRIVATE $<$:/permissive->) -set_target_properties(osp-common PROPERTIES - EXPORT_COMPILE_COMMANDS TRUE - INSTALL_RPATH "$ORIGIN/lib" - C_EXTENSIONS OFF - C_STANDARD_REQUIRED ON - CXX_EXTENSIONS OFF - CXX_STANDARD_REQUIRED ON -) + +# Copy root/bin to build/bin after building +add_custom_command(TARGET OspGL + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../../bin" "${CMAKE_BINARY_DIR}/$" + VERBATIM +) \ No newline at end of file diff --git a/src/standalone/drawing_gl/FullscreenTriShader.cpp b/src/osp_drawing_gl/FullscreenTriShader.cpp similarity index 100% rename from src/standalone/drawing_gl/FullscreenTriShader.cpp rename to src/osp_drawing_gl/FullscreenTriShader.cpp diff --git a/src/standalone/drawing_gl/FullscreenTriShader.h b/src/osp_drawing_gl/FullscreenTriShader.h similarity index 100% rename from src/standalone/drawing_gl/FullscreenTriShader.h rename to src/osp_drawing_gl/FullscreenTriShader.h diff --git a/src/standalone/drawing_gl/rendergl.cpp b/src/osp_drawing_gl/rendergl.cpp similarity index 100% rename from src/standalone/drawing_gl/rendergl.cpp rename to src/osp_drawing_gl/rendergl.cpp diff --git a/src/standalone/drawing_gl/rendergl.h b/src/osp_drawing_gl/rendergl.h similarity index 100% rename from src/standalone/drawing_gl/rendergl.h rename to src/osp_drawing_gl/rendergl.h diff --git a/src/ospjolt/CMakeLists.txt b/src/ospjolt/CMakeLists.txt new file mode 100644 index 00000000..07e42771 --- /dev/null +++ b/src/ospjolt/CMakeLists.txt @@ -0,0 +1,54 @@ +## +# Open Space Program +# Copyright © 2019-2024 Open Space Program Project +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +## + +find_package(Magnum REQUIRED + Trade + ) + +SET(DEPS_LIBS + EnTT::EnTT + Corrade::Main + Magnum::Magnum + Magnum::Trade + longeron + spdlog + OpenSpaceProgram + Jolt) + +add_library(OspJolt STATIC) + + +target_compile_features(OspJolt PUBLIC cxx_std_20) + +# Link it to the interface library that describes the dependencies +target_link_libraries(OspJolt PUBLIC ${DEPS_LIBS}) + +# Gather paths to OSP headers and sources +file(GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS *.cpp) +file(GLOB_RECURSE H_FILES CONFIGURE_DEPENDS *.h) +target_sources(OspJolt PRIVATE "${CPP_FILES}" "${H_FILES}") + +# Enforce conformance mode for OspJolt +target_compile_options(OspJolt PRIVATE $<$:/permissive->) \ No newline at end of file diff --git a/src/common/ospjolt/activescene/forcefactors.h b/src/ospjolt/forcefactors.h similarity index 100% rename from src/common/ospjolt/activescene/forcefactors.h rename to src/ospjolt/forcefactors.h diff --git a/src/common/ospjolt/activescene/joltinteg.h b/src/ospjolt/joltinteg.h similarity index 100% rename from src/common/ospjolt/activescene/joltinteg.h rename to src/ospjolt/joltinteg.h diff --git a/src/common/ospjolt/activescene/joltinteg_fn.cpp b/src/ospjolt/joltinteg_fn.cpp similarity index 100% rename from src/common/ospjolt/activescene/joltinteg_fn.cpp rename to src/ospjolt/joltinteg_fn.cpp diff --git a/src/common/ospjolt/activescene/joltinteg_fn.h b/src/ospjolt/joltinteg_fn.h similarity index 100% rename from src/common/ospjolt/activescene/joltinteg_fn.h rename to src/ospjolt/joltinteg_fn.h diff --git a/src/planet-a/CMakeLists.txt b/src/planet-a/CMakeLists.txt new file mode 100644 index 00000000..e402b512 --- /dev/null +++ b/src/planet-a/CMakeLists.txt @@ -0,0 +1,51 @@ +## +# Open Space Program +# Copyright © 2019-2024 Open Space Program Project +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +## + +find_package(Magnum REQUIRED + Trade + ) + +SET(DEPS_LIBS + EnTT::EnTT + Corrade::Main + Magnum::Magnum + Magnum::Trade + longeron + OpenSpaceProgram) + +add_library(PlanetA STATIC) + +target_compile_features(PlanetA PUBLIC cxx_std_20) + +# Link it to the interface library that describes the dependencies +target_link_libraries(PlanetA PRIVATE ${DEPS_LIBS}) + +# Gather paths to OSP headers and sources +file(GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS *.cpp) +file(GLOB_RECURSE H_FILES CONFIGURE_DEPENDS *.h) +target_sources(PlanetA PRIVATE "${CPP_FILES}" "${H_FILES}") + +# Enforce conformance mode for adera +target_compile_options(PlanetA PRIVATE $<$:/permissive->) \ No newline at end of file diff --git a/src/common/planet-a/chunk_generate.cpp b/src/planet-a/chunk_generate.cpp similarity index 100% rename from src/common/planet-a/chunk_generate.cpp rename to src/planet-a/chunk_generate.cpp diff --git a/src/common/planet-a/chunk_generate.h b/src/planet-a/chunk_generate.h similarity index 100% rename from src/common/planet-a/chunk_generate.h rename to src/planet-a/chunk_generate.h diff --git a/src/common/planet-a/chunk_utils.cpp b/src/planet-a/chunk_utils.cpp similarity index 100% rename from src/common/planet-a/chunk_utils.cpp rename to src/planet-a/chunk_utils.cpp diff --git a/src/common/planet-a/chunk_utils.h b/src/planet-a/chunk_utils.h similarity index 100% rename from src/common/planet-a/chunk_utils.h rename to src/planet-a/chunk_utils.h diff --git a/src/common/planet-a/geometry.cpp b/src/planet-a/geometry.cpp similarity index 100% rename from src/common/planet-a/geometry.cpp rename to src/planet-a/geometry.cpp diff --git a/src/common/planet-a/geometry.h b/src/planet-a/geometry.h similarity index 100% rename from src/common/planet-a/geometry.h rename to src/planet-a/geometry.h diff --git a/src/common/planet-a/icosahedron.cpp b/src/planet-a/icosahedron.cpp similarity index 100% rename from src/common/planet-a/icosahedron.cpp rename to src/planet-a/icosahedron.cpp diff --git a/src/common/planet-a/icosahedron.h b/src/planet-a/icosahedron.h similarity index 100% rename from src/common/planet-a/icosahedron.h rename to src/planet-a/icosahedron.h diff --git a/src/common/planet-a/planeta_types.h b/src/planet-a/planeta_types.h similarity index 100% rename from src/common/planet-a/planeta_types.h rename to src/planet-a/planeta_types.h diff --git a/src/common/planet-a/skeleton.cpp b/src/planet-a/skeleton.cpp similarity index 100% rename from src/common/planet-a/skeleton.cpp rename to src/planet-a/skeleton.cpp diff --git a/src/common/planet-a/skeleton.h b/src/planet-a/skeleton.h similarity index 100% rename from src/common/planet-a/skeleton.h rename to src/planet-a/skeleton.h diff --git a/src/common/planet-a/skeleton_subdiv.cpp b/src/planet-a/skeleton_subdiv.cpp similarity index 100% rename from src/common/planet-a/skeleton_subdiv.cpp rename to src/planet-a/skeleton_subdiv.cpp diff --git a/src/common/planet-a/skeleton_subdiv.h b/src/planet-a/skeleton_subdiv.h similarity index 100% rename from src/common/planet-a/skeleton_subdiv.h rename to src/planet-a/skeleton_subdiv.h diff --git a/src/common/planet-a/subdiv_id_registry.h b/src/planet-a/subdiv_id_registry.h similarity index 100% rename from src/common/planet-a/subdiv_id_registry.h rename to src/planet-a/subdiv_id_registry.h diff --git a/src/standalone/CMakeLists.txt b/src/testapp/CMakeLists.txt similarity index 81% rename from src/standalone/CMakeLists.txt rename to src/testapp/CMakeLists.txt index 11843725..41de853c 100644 --- a/src/standalone/CMakeLists.txt +++ b/src/testapp/CMakeLists.txt @@ -52,7 +52,6 @@ add_custom_target(compile-osp-magnum-deps) # result in the dependencies of the interface building. # See: https://gitlab.kitware.com/cmake/cmake/-/issues/23569 SET(OSP_MAGNUM_DEPS_LIBS - osp-common Threads::Threads EnTT::EnTT Corrade::Main @@ -69,7 +68,12 @@ SET(OSP_MAGNUM_DEPS_LIBS toml11 spdlog longeron - Jolt) + OpenSpaceProgram + Adera + AderaGL + OspGL + OspJolt + PlanetA) target_link_libraries(osp-magnum-deps INTERFACE ${OSP_MAGNUM_DEPS_LIBS}) add_dependencies(compile-osp-magnum-deps ${OSP_MAGNUM_DEPS_LIBS}) @@ -87,20 +91,6 @@ file(GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS *.cpp) file(GLOB_RECURSE H_FILES CONFIGURE_DEPENDS *.h) target_sources(osp-magnum PRIVATE "${CPP_FILES}" "${H_FILES}") -# Add shaders to IDE project -set(SHADERS_DIR "../../bin/OSPData/adera/Shaders") -file (GLOB_RECURSE SHADER_FILES CONFIGURE_DEPENDS - "${SHADERS_DIR}/*.vert" - "${SHADERS_DIR}/*.frag" - "${SHADERS_DIR}/*.comp" -) -# For some reason, source_group() requires all files to be added to the executable -target_sources(osp-magnum PRIVATE "${SHADER_FILES}") - -# Segregate headers, shaders into filters -source_group("Shader Files" FILES ${SHADER_FILES}) -source_group("Header Files" FILES ${H_FILES}) - # Enforce conformance mode for osp-magnum target_compile_options(osp-magnum PRIVATE $<$:/permissive->) @@ -113,13 +103,6 @@ set_target_properties(osp-magnum PROPERTIES CXX_STANDARD_REQUIRED ON ) -# Copy root/bin to build/bin after building -add_custom_command(TARGET osp-magnum - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/../../bin" "${CMAKE_BINARY_DIR}/$" - VERBATIM -) - add_custom_target(run-osp-magnum COMMAND $ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/$) diff --git a/src/standalone/testapp/MagnumApplication.cpp b/src/testapp/MagnumApplication.cpp similarity index 100% rename from src/standalone/testapp/MagnumApplication.cpp rename to src/testapp/MagnumApplication.cpp diff --git a/src/standalone/testapp/MagnumApplication.h b/src/testapp/MagnumApplication.h similarity index 100% rename from src/standalone/testapp/MagnumApplication.h rename to src/testapp/MagnumApplication.h diff --git a/src/standalone/testapp/README.md b/src/testapp/README.md similarity index 100% rename from src/standalone/testapp/README.md rename to src/testapp/README.md diff --git a/src/standalone/testapp/enginetest.cpp b/src/testapp/enginetest.cpp similarity index 99% rename from src/standalone/testapp/enginetest.cpp rename to src/testapp/enginetest.cpp index aa2d21b2..0a1c7bfa 100644 --- a/src/standalone/testapp/enginetest.cpp +++ b/src/testapp/enginetest.cpp @@ -29,10 +29,10 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/src/standalone/testapp/enginetest.h b/src/testapp/enginetest.h similarity index 98% rename from src/standalone/testapp/enginetest.h rename to src/testapp/enginetest.h index d0c0ed23..2961deb8 100644 --- a/src/standalone/testapp/enginetest.h +++ b/src/testapp/enginetest.h @@ -26,7 +26,7 @@ #include "MagnumApplication.h" -#include +#include namespace testapp::enginetest { diff --git a/src/standalone/testapp/identifiers.h b/src/testapp/identifiers.h similarity index 100% rename from src/standalone/testapp/identifiers.h rename to src/testapp/identifiers.h diff --git a/src/standalone/testapp/main.cpp b/src/testapp/main.cpp similarity index 100% rename from src/standalone/testapp/main.cpp rename to src/testapp/main.cpp diff --git a/src/standalone/testapp/scenarios.cpp b/src/testapp/scenarios.cpp similarity index 100% rename from src/standalone/testapp/scenarios.cpp rename to src/testapp/scenarios.cpp diff --git a/src/standalone/testapp/scenarios.h b/src/testapp/scenarios.h similarity index 100% rename from src/standalone/testapp/scenarios.h rename to src/testapp/scenarios.h diff --git a/src/standalone/testapp/sessions/common.cpp b/src/testapp/sessions/common.cpp similarity index 100% rename from src/standalone/testapp/sessions/common.cpp rename to src/testapp/sessions/common.cpp diff --git a/src/standalone/testapp/sessions/common.h b/src/testapp/sessions/common.h similarity index 100% rename from src/standalone/testapp/sessions/common.h rename to src/testapp/sessions/common.h diff --git a/src/standalone/testapp/sessions/jolt.cpp b/src/testapp/sessions/jolt.cpp similarity index 99% rename from src/standalone/testapp/sessions/jolt.cpp rename to src/testapp/sessions/jolt.cpp index 4e495e24..ccf886cb 100644 --- a/src/standalone/testapp/sessions/jolt.cpp +++ b/src/testapp/sessions/jolt.cpp @@ -35,7 +35,7 @@ #include -#include +#include using namespace osp; using namespace osp::active; diff --git a/src/standalone/testapp/sessions/jolt.h b/src/testapp/sessions/jolt.h similarity index 96% rename from src/standalone/testapp/sessions/jolt.h rename to src/testapp/sessions/jolt.h index 03d8077d..6acc2383 100644 --- a/src/standalone/testapp/sessions/jolt.h +++ b/src/testapp/sessions/jolt.h @@ -32,7 +32,7 @@ #include #include -#include +#include #include diff --git a/src/standalone/testapp/sessions/magnum.cpp b/src/testapp/sessions/magnum.cpp similarity index 99% rename from src/standalone/testapp/sessions/magnum.cpp rename to src/testapp/sessions/magnum.cpp index b9200d3e..2e07164f 100644 --- a/src/standalone/testapp/sessions/magnum.cpp +++ b/src/testapp/sessions/magnum.cpp @@ -31,12 +31,12 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include #include diff --git a/src/standalone/testapp/sessions/magnum.h b/src/testapp/sessions/magnum.h similarity index 100% rename from src/standalone/testapp/sessions/magnum.h rename to src/testapp/sessions/magnum.h diff --git a/src/standalone/testapp/sessions/misc.cpp b/src/testapp/sessions/misc.cpp similarity index 100% rename from src/standalone/testapp/sessions/misc.cpp rename to src/testapp/sessions/misc.cpp diff --git a/src/standalone/testapp/sessions/misc.h b/src/testapp/sessions/misc.h similarity index 100% rename from src/standalone/testapp/sessions/misc.h rename to src/testapp/sessions/misc.h diff --git a/src/standalone/testapp/sessions/physics.cpp b/src/testapp/sessions/physics.cpp similarity index 100% rename from src/standalone/testapp/sessions/physics.cpp rename to src/testapp/sessions/physics.cpp diff --git a/src/standalone/testapp/sessions/physics.h b/src/testapp/sessions/physics.h similarity index 100% rename from src/standalone/testapp/sessions/physics.h rename to src/testapp/sessions/physics.h diff --git a/src/standalone/testapp/sessions/shapes.cpp b/src/testapp/sessions/shapes.cpp similarity index 100% rename from src/standalone/testapp/sessions/shapes.cpp rename to src/testapp/sessions/shapes.cpp diff --git a/src/standalone/testapp/sessions/shapes.h b/src/testapp/sessions/shapes.h similarity index 100% rename from src/standalone/testapp/sessions/shapes.h rename to src/testapp/sessions/shapes.h diff --git a/src/standalone/testapp/sessions/terrain.cpp b/src/testapp/sessions/terrain.cpp similarity index 100% rename from src/standalone/testapp/sessions/terrain.cpp rename to src/testapp/sessions/terrain.cpp diff --git a/src/standalone/testapp/sessions/terrain.h b/src/testapp/sessions/terrain.h similarity index 100% rename from src/standalone/testapp/sessions/terrain.h rename to src/testapp/sessions/terrain.h diff --git a/src/standalone/testapp/sessions/universe.cpp b/src/testapp/sessions/universe.cpp similarity index 100% rename from src/standalone/testapp/sessions/universe.cpp rename to src/testapp/sessions/universe.cpp diff --git a/src/standalone/testapp/sessions/universe.h b/src/testapp/sessions/universe.h similarity index 100% rename from src/standalone/testapp/sessions/universe.h rename to src/testapp/sessions/universe.h diff --git a/src/standalone/testapp/sessions/vehicles.cpp b/src/testapp/sessions/vehicles.cpp similarity index 100% rename from src/standalone/testapp/sessions/vehicles.cpp rename to src/testapp/sessions/vehicles.cpp diff --git a/src/standalone/testapp/sessions/vehicles.h b/src/testapp/sessions/vehicles.h similarity index 100% rename from src/standalone/testapp/sessions/vehicles.h rename to src/testapp/sessions/vehicles.h diff --git a/src/standalone/testapp/sessions/vehicles_machines.cpp b/src/testapp/sessions/vehicles_machines.cpp similarity index 100% rename from src/standalone/testapp/sessions/vehicles_machines.cpp rename to src/testapp/sessions/vehicles_machines.cpp diff --git a/src/standalone/testapp/sessions/vehicles_machines.h b/src/testapp/sessions/vehicles_machines.h similarity index 100% rename from src/standalone/testapp/sessions/vehicles_machines.h rename to src/testapp/sessions/vehicles_machines.h diff --git a/src/standalone/testapp/sessions/vehicles_prebuilt.cpp b/src/testapp/sessions/vehicles_prebuilt.cpp similarity index 100% rename from src/standalone/testapp/sessions/vehicles_prebuilt.cpp rename to src/testapp/sessions/vehicles_prebuilt.cpp diff --git a/src/standalone/testapp/sessions/vehicles_prebuilt.h b/src/testapp/sessions/vehicles_prebuilt.h similarity index 100% rename from src/standalone/testapp/sessions/vehicles_prebuilt.h rename to src/testapp/sessions/vehicles_prebuilt.h diff --git a/src/standalone/testapp/testapp.cpp b/src/testapp/testapp.cpp similarity index 100% rename from src/standalone/testapp/testapp.cpp rename to src/testapp/testapp.cpp diff --git a/src/standalone/testapp/testapp.h b/src/testapp/testapp.h similarity index 100% rename from src/standalone/testapp/testapp.h rename to src/testapp/testapp.h diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f9fcf1f7..ac805025 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -32,7 +32,7 @@ include(GoogleTest) add_library(test-deps INTERFACE) add_custom_target(compile-test-deps) -set(TEST_DEPS_LIBRARIES gtest_main longeron EnTT::EnTT Magnum::Magnum) +set(TEST_DEPS_LIBRARIES gtest_main longeron EnTT::EnTT Magnum::Magnum OpenSpaceProgram) target_link_libraries(test-deps INTERFACE ${TEST_DEPS_LIBRARIES}) add_dependencies(compile-test-deps ${TEST_DEPS_LIBRARIES})