File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -244,8 +244,12 @@ add_library(supertux2_c OBJECT ${SUPERTUX_SOURCES_C})
244
244
add_library (supertux2_lib STATIC ${CMAKE_BINARY_DIR} /version .h ${SUPERTUX_SOURCES_CXX} ${SUPERTUX_RESOURCES} $<TARGET_OBJECTS:supertux2_c>)
245
245
target_include_directories (supertux2_lib PUBLIC ${CMAKE_BINARY_DIR} src/)
246
246
247
- file (GLOB_RECURSE SUPERTUX_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/**.hpp)
248
- target_precompile_headers(supertux2_lib PRIVATE ${SUPERTUX_HEADERS} )
247
+ # Pre-compiled headers
248
+ option (SUPERTUX_PCH "Pre-compile headers (faster builds)" ON )
249
+ if (SUPERTUX_PCH)
250
+ file (GLOB_RECURSE SUPERTUX_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/**.hpp)
251
+ target_precompile_headers(supertux2_lib PRIVATE ${SUPERTUX_HEADERS} )
252
+ endif ()
249
253
250
254
if (WIN32 )
251
255
add_executable (supertux2 WIN32 src/main.cpp ${CMAKE_CURRENT_SOURCE_DIR} /data/images/engine/icons/supertux.rc)
You can’t perform that action at this time.
0 commit comments