diff --git a/example02_threaded_raytracing/CMakeLists.txt b/example02_threaded_raytracing/CMakeLists.txt index 64d471c..8976e93 100644 --- a/example02_threaded_raytracing/CMakeLists.txt +++ b/example02_threaded_raytracing/CMakeLists.txt @@ -31,7 +31,13 @@ find_package(Threads REQUIRED) target_link_libraries(Example02 PUBLIC ${CMAKE_THREAD_LIBS_INIT}) find_package(glm REQUIRED) -get_target_property(GLM_INCLUDE_DIRS glm INTERFACE_INCLUDE_DIRECTORIES) +if(TARGET glm::glm) + get_target_property(GLM_INCLUDE_DIRS glm::glm INTERFACE_INCLUDE_DIRECTORIES) +elseif(TARGET glm) + get_target_property(GLM_INCLUDE_DIRS glm INTERFACE_INCLUDE_DIRECTORIES) +else() + message(FATAL_ERROR "Failed to set up glm for project") +endif() target_include_directories(Example02 PUBLIC ${GLM_INCLUDE_DIRS}) find_program(CLANG_FORMAT "clang-format") diff --git a/example02_threaded_raytracing/src/rayTracer.cpp b/example02_threaded_raytracing/src/rayTracer.cpp index 1da58c6..50036d0 100644 --- a/example02_threaded_raytracing/src/rayTracer.cpp +++ b/example02_threaded_raytracing/src/rayTracer.cpp @@ -5,15 +5,9 @@ #include #include -#ifdef __MINGW32__ -# include "/usr/include/glm/ext/matrix_transform.hpp" -# include "/usr/include/glm/gtc/matrix_transform.hpp" -# include "/usr/include/glm/matrix.hpp" -#else -# include -# include -# include -#endif +#include +#include +#include const float PI = std::acos(-1.0F); diff --git a/example02_threaded_raytracing/src/rayTracer.hpp b/example02_threaded_raytracing/src/rayTracer.hpp index 59018fa..2f5307d 100644 --- a/example02_threaded_raytracing/src/rayTracer.hpp +++ b/example02_threaded_raytracing/src/rayTracer.hpp @@ -12,15 +12,9 @@ constexpr float EX02_RAY_TRACER_GRAY_SPHERE_RADIUS = 1.5F; #include #include -#ifdef __MINGW32__ -# include "/usr/include/glm/mat4x4.hpp" -# include "/usr/include/glm/matrix.hpp" -# include "/usr/include/glm/vec3.hpp" -#else -# include -# include -# include -#endif +#include +#include +#include namespace Ex02::RT {