From debeb8311930135b39c927c26b2f98050232c509 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 11 Dec 2023 22:54:55 -0600 Subject: [PATCH] [glutils] Move glutils to deps --- CMakeLists.txt | 1 + deps/glutils/CMakeLists.txt | 10 ++++++++++ {src => deps/glutils/include}/glutils/glutils.hpp | 0 {src/glutils => deps/glutils/src}/CMakeLists.txt | 14 ++++++-------- {src/glutils => deps/glutils/src}/glutils.cpp | 2 +- src/CMakeLists.txt | 3 --- 6 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 deps/glutils/CMakeLists.txt rename {src => deps/glutils/include}/glutils/glutils.hpp (100%) rename {src/glutils => deps/glutils/src}/CMakeLists.txt (75%) rename {src/glutils => deps/glutils/src}/glutils.cpp (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95170aec..6a44f8d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,7 @@ if(NOT BUILDCORE_TARGET STREQUAL "gba") set(GLFW_BUILD_TESTS OFF) set(GLFW_BUILD_DOCS OFF) add_subdirectory(deps/glfw) + add_subdirectory(deps/glutils) add_subdirectory(deps/imgui) add_subdirectory(deps/lodepng) add_subdirectory(deps/nfde) diff --git a/deps/glutils/CMakeLists.txt b/deps/glutils/CMakeLists.txt new file mode 100644 index 00000000..59c6ea3d --- /dev/null +++ b/deps/glutils/CMakeLists.txt @@ -0,0 +1,10 @@ +project(GlUtils CXX) + +add_subdirectory(src) + +install( + DIRECTORY + include/glutils + DESTINATION + include +) diff --git a/src/glutils/glutils.hpp b/deps/glutils/include/glutils/glutils.hpp similarity index 100% rename from src/glutils/glutils.hpp rename to deps/glutils/include/glutils/glutils.hpp diff --git a/src/glutils/CMakeLists.txt b/deps/glutils/src/CMakeLists.txt similarity index 75% rename from src/glutils/CMakeLists.txt rename to deps/glutils/src/CMakeLists.txt index 1b282a55..3290535e 100644 --- a/src/glutils/CMakeLists.txt +++ b/deps/glutils/src/CMakeLists.txt @@ -3,23 +3,21 @@ add_library( glutils.cpp ) +target_include_directories( + GlUtils PUBLIC + ../include +) + target_link_libraries( GlUtils PUBLIC OxStd glad ) -install( - FILES - glutils.hpp - DESTINATION - include/glutils -) - install( TARGETS GlUtils DESTINATION LIBRARY DESTINATION lib ARCHIVE DESTINATION lib -) \ No newline at end of file +) diff --git a/src/glutils/glutils.cpp b/deps/glutils/src/glutils.cpp similarity index 99% rename from src/glutils/glutils.cpp rename to deps/glutils/src/glutils.cpp index b1024976..82315a8a 100644 --- a/src/glutils/glutils.cpp +++ b/deps/glutils/src/glutils.cpp @@ -6,7 +6,7 @@ #include #include -#include "glutils.hpp" +#include "glutils/glutils.hpp" namespace glutils { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c678bebe..3a1eb9e6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,8 +2,5 @@ include_directories(".") set(OLYMPIC_PATH "${CMAKE_CURRENT_SOURCE_DIR}/olympic") -if(TURBINE_BUILD_TYPE STREQUAL "Native") - add_subdirectory(glutils) -endif() add_subdirectory(nostalgia) add_subdirectory(olympic)