File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ option(OMATH_BUILD_EXAMPLES "Build example projects with you can learn & play" O
14
14
option (OMATH_STATIC_MSVC_RUNTIME_LIBRARY "Force Omath to link static runtime" OFF )
15
15
option (OMATH_SUPRESS_SAFETY_CHECKS "Supress some safety checks in release build to improve general performance" ON )
16
16
option (OMATH_USE_UNITY_BUILD "Will enable unity build to speed up compilation" ON )
17
+ option (OMATH_ENABLE_LEGACY "Will enable legacy classes that MUST be used ONLY for backward compatibility" OFF )
18
+
17
19
18
20
file (GLOB_RECURSE OMATH_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /source/*.cpp" )
19
21
file (GLOB_RECURSE OMATH_HEADERS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /include/*.hpp" )
@@ -56,6 +58,10 @@ if (OMATH_SUPRESS_SAFETY_CHECKS)
56
58
target_compile_definitions (${PROJECT_NAME} PUBLIC OMATH_SUPRESS_SAFETY_CHECKS )
57
59
endif ()
58
60
61
+ if (OMATH_ENABLE_LEGACY )
62
+ target_compile_options (${PROJECT_NAME} PUBLIC OMATH_ENABLE_LEGACY )
63
+ endif ()
64
+
59
65
set_target_properties (${PROJECT_NAME} PROPERTIES
60
66
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR} /out/${CMAKE_BUILD_TYPE} "
61
67
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR} /out/${CMAKE_BUILD_TYPE} "
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+
3
+ #ifdef OMATH_ENABLE_LEGACY
4
+
2
5
#include " omath/vector3.hpp"
3
6
#include < initializer_list>
4
7
#include < memory>
@@ -106,3 +109,4 @@ namespace omath
106
109
std::unique_ptr<float []> m_data;
107
110
};
108
111
} // namespace omath
112
+ #endif
Original file line number Diff line number Diff line change
1
+ #ifdef OMATH_ENABLE_LEGACY
2
+
1
3
#include " omath/matrix.hpp"
2
4
#include " omath/angles.hpp"
3
5
#include " omath/vector3.hpp"
@@ -359,3 +361,4 @@ namespace omath
359
361
m_data = nullptr ;
360
362
}
361
363
} // namespace omath
364
+ #endif
You can’t perform that action at this time.
0 commit comments