From f25d0e4c1764f6e76c80a99eb7c63073d1fe5cdc Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 26 Sep 2024 11:53:28 +0200 Subject: [PATCH] Move tinyobjloader to extern folder --- CMakeLists.txt | 3 +-- extern/CMakeLists.txt | 3 ++- extern/tinyobjloader/CMakeLists.txt | 2 ++ {include => extern/tinyobjloader/include}/tiny_obj_loader.h | 0 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 extern/tinyobjloader/CMakeLists.txt rename {include => extern/tinyobjloader/include}/tiny_obj_loader.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71c8d2c..e3e08ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,14 +14,13 @@ add_executable(raytracer include/lighting.h include/ray.h include/image.h - include/tiny_obj_loader.h include/scene.h include/aabb.h include/octree.h src/main.cpp src/scene.cpp) target_include_directories(raytracer PUBLIC include PRIVATE ${GLM_INCLUDE_DIR}) -target_link_libraries(raytracer PUBLIC stb SDL2::Main imgui glad) +target_link_libraries(raytracer PUBLIC stb SDL2::Main imgui glad tinyobjloader) set_target_properties(raytracer PROPERTIES CXX_STANDARD 23 CXX_STANDARD_REQUIRED YES diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index f2d2816..3235bb1 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -1,3 +1,4 @@ add_subdirectory(stb) add_subdirectory(glad) -add_subdirectory(imgui) \ No newline at end of file +add_subdirectory(imgui) +add_subdirectory(tinyobjloader) \ No newline at end of file diff --git a/extern/tinyobjloader/CMakeLists.txt b/extern/tinyobjloader/CMakeLists.txt new file mode 100644 index 0000000..f8cfb3b --- /dev/null +++ b/extern/tinyobjloader/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(tinyobjloader INTERFACE) +target_include_directories(tinyobjloader INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) \ No newline at end of file diff --git a/include/tiny_obj_loader.h b/extern/tinyobjloader/include/tiny_obj_loader.h similarity index 100% rename from include/tiny_obj_loader.h rename to extern/tinyobjloader/include/tiny_obj_loader.h