Enable precompiled headers for all platforms

meow-7.2.2
Rye 2024-10-14 22:14:25 -07:00 committed by Andrey Lihatskiy
parent d8fa590fca
commit 5aedf53f01
1 changed files with 16 additions and 4 deletions

View File

@ -1417,6 +1417,18 @@ if (DARWIN)
LIST(APPEND viewer_SOURCE_FILES llfilepicker_mac.mm)
LIST(APPEND viewer_HEADER_FILES llfilepicker_mac.h)
set_source_files_properties(
llappviewermacosx-objc.mm
PROPERTIES
SKIP_PRECOMPILE_HEADERS TRUE
)
set_source_files_properties(
llfilepicker_mac.mm
PROPERTIES
SKIP_PRECOMPILE_HEADERS TRUE
)
# This should be compiled with the viewer.
LIST(APPEND viewer_SOURCE_FILES llappdelegate-objc.mm)
set_source_files_properties(
@ -1705,6 +1717,10 @@ list(APPEND EVENT_HOST_SCRIPTS ${EVENT_HOST_SCRIPT_GLOB_LIST})
set(PACKAGE ON CACHE BOOL
"Add a package target that builds an installer package.")
if(USE_PRECOMPILED_HEADERS)
target_precompile_headers( ${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h )
endif(USE_PRECOMPILED_HEADERS)
if (WINDOWS)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
@ -1715,10 +1731,6 @@ if (WINDOWS)
)
target_compile_options(${VIEWER_BINARY_NAME} PRIVATE /bigobj)
if(USE_PRECOMPILED_HEADERS)
target_precompile_headers( ${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h )
endif(USE_PRECOMPILED_HEADERS)
# If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
# here.
# *NOTE:Mani - This is a crappy hack to have important dependencies for the viewer_manifest copy action