mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
CMake: Work around CMake issue 20206
This commit is contained in:
parent
a1d43f7b88
commit
28b85d2f58
@ -37,6 +37,17 @@ set(COMPOSITE_GENERATOR "${CMAKE_SOURCE_DIR}/cmake/scripts/MakeComposite.cmake")
|
|||||||
function(composite_sources target sources_var)
|
function(composite_sources target sources_var)
|
||||||
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
|
||||||
# CMake 3.16+ implements CMAKE_UNITY_BUILD* natively; no need to continue!
|
# CMake 3.16+ implements CMAKE_UNITY_BUILD* natively; no need to continue!
|
||||||
|
|
||||||
|
# Actually - <=3.16.2 has difficulty with multi-language support, so only
|
||||||
|
# allow .cxx in. Hopefully this can be removed soon.
|
||||||
|
foreach(_source ${${sources_var}})
|
||||||
|
get_filename_component(_source_ext "${_source}" EXT)
|
||||||
|
if(NOT _source_ext STREQUAL ".cxx")
|
||||||
|
set_source_files_properties(${_source} PROPERTIES
|
||||||
|
SKIP_UNITY_BUILD_INCLUSION YES)
|
||||||
|
endif()
|
||||||
|
endforeach(_source)
|
||||||
|
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -8,6 +8,11 @@ set(P3SHOWBASE_SOURCES
|
|||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
list(APPEND P3SHOWBASE_SOURCES showBase_assist.mm)
|
list(APPEND P3SHOWBASE_SOURCES showBase_assist.mm)
|
||||||
|
|
||||||
|
# Bug in CMake 3.16.2: it tries to put .mm with the .cxx
|
||||||
|
set_source_files_properties(showBase_assist.mm PROPERTIES
|
||||||
|
SKIP_UNITY_BUILD_INCLUSION YES)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_component_library(p3showbase NOINIT SYMBOL BUILDING_DIRECT_SHOWBASE
|
add_component_library(p3showbase NOINIT SYMBOL BUILDING_DIRECT_SHOWBASE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user