Merge topic 'fix-INTERFACE-with-no-SHARED-libs'
64f73b0
add_library: Fix INTERFACE on platforms with no shared libs (#14561)
This commit is contained in:
commit
3c4071bec4
|
@ -229,6 +229,7 @@ bool cmAddLibraryCommand
|
|||
yet its linker language. */
|
||||
if ((type != cmTarget::STATIC_LIBRARY) &&
|
||||
(type != cmTarget::OBJECT_LIBRARY) &&
|
||||
(type != cmTarget::INTERFACE_LIBRARY) &&
|
||||
(this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
|
||||
"TARGET_SUPPORTS_SHARED_LIBS") == false))
|
||||
{
|
||||
|
|
|
@ -2,3 +2,4 @@ include(RunCMake)
|
|||
|
||||
run_cmake(invalid_name)
|
||||
run_cmake(target_commands)
|
||||
run_cmake(no_shared_libs)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
^$
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
cmake_minimum_required(VERSION 2.8.12.20131009)
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
add_library(foo INTERFACE)
|
||||
target_compile_definitions(foo INTERFACE FOO_DEFINE)
|
Loading…
Reference in New Issue