Added PCH support
This commit is contained in:
parent
294f806900
commit
2cce381afe
@ -43,7 +43,15 @@ if(DISABLE_CPU_OPTI)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# targets declarations
|
# targets declarations
|
||||||
add_executable(${PROJECT_NAME} ${MAIN_SCRS} ${UTILS_SCRS} ${MISC_SCRS} ${GAME_SCRS} ${GRAPHS_SCRS} ${SOUNDS_SCRS})
|
add_executable(${PROJECT_NAME})
|
||||||
|
target_precompile_headers(${PROJECT_NAME} PRIVATE
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:<string$<ANGLE-R>>"
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:<stdexcept$<ANGLE-R>>"
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:<vector$<ANGLE-R>>"
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:<memory$<ANGLE-R>>"
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/Engine/Utils/3DMaths.hpp>"
|
||||||
|
)
|
||||||
|
target_sources(${PROJECT_NAME} PUBLIC ${MAIN_SCRS} ${UTILS_SCRS} ${MISC_SCRS} ${GAME_SCRS} ${GRAPHS_SCRS} ${SOUNDS_SCRS})
|
||||||
target_link_libraries(${PROJECT_NAME} sfml::sfml)
|
target_link_libraries(${PROJECT_NAME} sfml::sfml)
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||||
OUTPUT_NAME ${PROJECT_NAME}${BUILDNAME_SUFFIX}
|
OUTPUT_NAME ${PROJECT_NAME}${BUILDNAME_SUFFIX}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Utils/3DMaths.hpp"
|
//#include "../Utils/3DMaths.hpp" // Using PCH instead
|
||||||
|
|
||||||
|
|
||||||
class Camera final {
|
class Camera final {
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "3DMaths.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
inline void M3D_ScalarSinCos(float* pSin, float* pCos, float Value) noexcept {
|
inline void M3D_ScalarSinCos(float* pSin, float* pCos, float Value) noexcept {
|
||||||
// Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder.
|
// Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <SFML/Graphics/Color.hpp>
|
#include <SFML/Graphics/Color.hpp>
|
||||||
|
|
||||||
#include "../Utils/3DMaths.hpp"
|
//#include "../Utils/3DMaths.hpp" // Using PCH instead
|
||||||
|
|
||||||
|
|
||||||
#define MHELPER_INDICES_TRI_ADD(array, i1, i2, i3) \
|
#define MHELPER_INDICES_TRI_ADD(array, i1, i2, i3) \
|
||||||
|
@ -5,8 +5,8 @@ set(MAIN_SCRS
|
|||||||
icon.h
|
icon.h
|
||||||
)
|
)
|
||||||
set(UTILS_SCRS
|
set(UTILS_SCRS
|
||||||
Engine/Utils/3DMaths.inl
|
#Engine/Utils/3DMaths.inl
|
||||||
Engine/Utils/3DMaths.hpp
|
#Engine/Utils/3DMaths.hpp
|
||||||
Engine/Utils/MeshHelper.hpp
|
Engine/Utils/MeshHelper.hpp
|
||||||
Engine/Utils/Timers.hpp
|
Engine/Utils/Timers.hpp
|
||||||
Engine/Utils/Perfs.cpp
|
Engine/Utils/Perfs.cpp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user