diff --git a/Hurrican/CMakeLists.txt b/Hurrican/CMakeLists.txt index df4760db..139baf12 100644 --- a/Hurrican/CMakeLists.txt +++ b/Hurrican/CMakeLists.txt @@ -519,6 +519,14 @@ include_directories(${CMAKE_SOURCE_DIR}/src/SDLPort) include_directories(${CMAKE_SOURCE_DIR}/3rdparty/glm) add_executable(${PROJECT_NAME} ${HURRICAN_SOURCES}) +# Enable pre compiled headers for way better compile times +OPTION(USE_PRECOMPILED_HEADERS "Enable pre compiled headers for better compile times" ON) +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16") + if(USE_PRECOMPILED_HEADERS) + target_precompile_headers(${PROJECT_NAME} PRIVATE src/stdafx.hpp) + endif() +endif() + OPTION(OPENMPT "Use OPENMPT for ImpulseTracker music file decoding" OFF) IF(OPENMPT) ADD_DEFINITIONS(-DUSE_OPENMPT) diff --git a/README.md b/README.md index 9c690fca..4eb78d77 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,10 @@ Sound * -DOPENMPT=ON : Use the libopenmpt code for music (SDL2_mixer uses libmodplug while SDL_mixer uses the lower quality mikmod engine) Generic -* -DFAST_RANDOM=OFF : Use standard C random function in place of the fast [LCG](https://en.wikipedia.org/wiki/Linear_congruential_generator) -* -DFAST_TRIG=ON : Use fast approximation for trigonometric functions -* -DDISABLE_EXCEPTIONS=ON : Disable exception handling to reduce binary size +* -DFAST_RANDOM=OFF : Use standard C random function in place of the fast [LCG](https://en.wikipedia.org/wiki/Linear_congruential_generator) +* -DFAST_TRIG=ON : Use fast approximation for trigonometric functions +* -DDISABLE_EXCEPTIONS=ON : Disable exception handling to reduce binary size +* -DUSE_PRECOMPILED_HEADERS=ON : Enable pre-compiled headers for better compile time Debug * -DDISABLE_MEMPOOLING=ON : Bypass pooled memory manager