mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
CMake: Don't always override target_link_libraries()
Previously, we would override target_link_libraries() to support object "linking" since this wasn't supported in versions of CMake before 3.12. Now that 3.12 is released, we only do it for versions of CMake before that release.
This commit is contained in:
parent
90d3b29767
commit
47b5a50688
@ -10,9 +10,10 @@
|
||||
#
|
||||
# Overrides CMake's target_link_libraries() to support "linking" object
|
||||
# libraries. This is a partial reimplementation of CMake commit dc38970f83,
|
||||
# which as of this writing has not yet landed in any release.
|
||||
# which is only available in CMake 3.12+
|
||||
#
|
||||
function(target_link_libraries target)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.12")
|
||||
function(target_link_libraries target)
|
||||
get_target_property(target_type "${target}" TYPE)
|
||||
if(NOT target_type STREQUAL "OBJECT_LIBRARY")
|
||||
_target_link_libraries("${target}" ${ARGN})
|
||||
@ -73,7 +74,8 @@ function(target_link_libraries target)
|
||||
|
||||
endforeach(library)
|
||||
|
||||
endfunction(target_link_libraries)
|
||||
endfunction(target_link_libraries)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Function: add_component_library(target [SYMBOL building_symbol]
|
||||
|
Loading…
x
Reference in New Issue
Block a user