diff --git a/CMakeLists.txt b/CMakeLists.txt index f39d8a8..399dd86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,10 +148,10 @@ target_link_directories(${PROJECT_NAME} PRIVATE src/run_modes/tester PRIVATE external/glad/src PRIVATE external/freetype/src - PRIVATE external/box2d/src + PRIVATE external/box2d/bin ) -target_link_libraries(${PROJECT_NAME} glfw glad glm dearimgui utils assets lua_static pugixml freetype box2d tester editor) +target_link_libraries(${PROJECT_NAME} box2d glfw glad glm dearimgui utils assets lua_static pugixml freetype tester editor) if(WIN32) target_link_libraries(${PROJECT_NAME} opengl32.lib) diff --git a/scripts/cmconfig.sh b/scripts/cmconfig.sh index 32be43d..24a769b 100755 --- a/scripts/cmconfig.sh +++ b/scripts/cmconfig.sh @@ -2,4 +2,11 @@ # This script expects to be run from the parent directory # ex. scripts/cmconfig.sh -cmake -Wno-dev -DNO_EDITOR=OFF -DGLFW_BUILD_DOCS=OFF -DBOX2D_BUILD_TESTBED=OFF -S . -B build/ \ No newline at end of file +if [ "$1" = "noedit" ] +then + echo "no editor" + cmake -Wno-dev -DNO_EDITOR=ON -DGLFW_BUILD_DOCS=OFF -DBOX2D_BUILD_TESTBED=OFF -S . -B build/ +else + echo "including editor" + cmake -Wno-dev -DNO_EDITOR=OFF -DGLFW_BUILD_DOCS=OFF -DBOX2D_BUILD_TESTBED=OFF -S . -B build/ +fi \ No newline at end of file diff --git a/src/core/core.cpp b/src/core/core.cpp index ed8c104..ba7779e 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -233,7 +233,7 @@ namespace lunarium else if (RunMode::MODE_EDITOR == mState.Mode) { #if BUILD_NO_EDITOR - Logger::Log(mLogCat, LogLevel::FATAL_ERROR, "The Editor is not available with this build"); + Logger::Log(LogCategory::CORE, LogLevel::FATAL_ERROR, "The Editor is not available with this build"); return; #else mpRunMode = new Editor; diff --git a/src/gui/fileBrowser.cpp b/src/gui/fileBrowser.cpp index 31278f3..13f4081 100644 --- a/src/gui/fileBrowser.cpp +++ b/src/gui/fileBrowser.cpp @@ -9,6 +9,8 @@ #include "fileBrowser.h" +#include +#include #include #include #include @@ -181,7 +183,7 @@ namespace lunarium { if (std::filesystem::is_directory(lhs) && std::filesystem::is_directory(rhs)) { - return strcmpi(lhs.filename().string().c_str(), rhs.filename().string().c_str()) < 0; + return strcmp(lhs.filename().string().c_str(), rhs.filename().string().c_str()) < 0; } if (std::filesystem::is_directory(lhs) && !std::filesystem::is_directory(rhs)) diff --git a/src/run_modes/tester/CMakeLists.txt b/src/run_modes/tester/CMakeLists.txt index 3d0ea9d..8662eed 100644 --- a/src/run_modes/tester/CMakeLists.txt +++ b/src/run_modes/tester/CMakeLists.txt @@ -8,4 +8,6 @@ target_include_directories(tester PUBLIC ../../../external/glad/include PUBLIC ../../../external/glfw/include PUBLIC ../../../external/box2d/include -) \ No newline at end of file +) + +target_link_libraries(tester box2d) \ No newline at end of file diff --git a/src/run_modes/tester/scenes/physicsScene.cpp b/src/run_modes/tester/scenes/physicsScene.cpp index 616eb72..5af2f29 100644 --- a/src/run_modes/tester/scenes/physicsScene.cpp +++ b/src/run_modes/tester/scenes/physicsScene.cpp @@ -7,7 +7,6 @@ ******************************************************************************/ #include "physicsScene.h" -#include #include #include #include diff --git a/src/run_modes/tester/scenes/physicsScene.h b/src/run_modes/tester/scenes/physicsScene.h index 84d11cd..dae793f 100644 --- a/src/run_modes/tester/scenes/physicsScene.h +++ b/src/run_modes/tester/scenes/physicsScene.h @@ -10,11 +10,7 @@ #define PHYSICS_SCENE_H_ #include "baseScene.h" - -class b2World; -class b2Body; -class b2PolygonShape; -class b2AABB; +#include namespace lunarium { diff --git a/src/run_modes/tester/tester.cpp b/src/run_modes/tester/tester.cpp index 84f0778..3a08dfa 100644 --- a/src/run_modes/tester/tester.cpp +++ b/src/run_modes/tester/tester.cpp @@ -10,7 +10,7 @@ #include "scenes/simpleRenderScene.h" #include "scenes/physicsScene.h" -#include +#include #include #include #include