Merge pull request #25 from orange-cpp/u/orange-cpp/hotfix

improved cmake+hotfix of clang support
This commit is contained in:
2025-01-17 16:59:30 +03:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -4,8 +4,6 @@ project(omath VERSION 1.0.1)
include(CMakePackageConfigHelpers)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
@@ -13,6 +11,7 @@ option(OMATH_BUILD_TESTS "Build unit tests" ON)
option(OMATH_THREAT_WARNING_AS_ERROR "Set highest level of warnings and force compiler to treat them as errors" ON)
option(OMATH_BUILD_AS_SHARED_LIBRARY "Build Omath as .so or .dll" OFF)
if (OMATH_BUILD_AS_SHARED_LIBRARY)
add_library(omath SHARED source/Vector3.cpp)
else()
@@ -22,6 +21,11 @@ else()
include/omath/engines/OpenGL/Camera.hpp)
endif()
set_target_properties(omath PROPERTIES
CXX_STANDARD 23
CXX_STANDARD_REQUIRED ON)
target_compile_features(omath PUBLIC cxx_std_23)
target_compile_definitions(omath PUBLIC OMATH_EXPORT)
add_subdirectory(source)

View File

@@ -9,7 +9,7 @@ namespace omath::opengl
{
Camera::Camera(const Vector3& position, const ViewAngles& viewAngles, const projection::ViewPort& viewPort,
const Angle<float, 0, 180, AngleFlags::Clamped>& fov, const float near, const float far) :
const Angle<float, 0.f, 180.f, AngleFlags::Clamped>& fov, const float near, const float far) :
projection::Camera<Mat4x4, ViewAngles>(position, viewAngles, viewPort, fov, near, far)
{
}