mirror of
https://github.com/reactos/CMake.git
synced 2025-02-13 16:10:57 +00:00
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 @@
|
||||
^$
|
5
Tests/RunCMake/interface_library/no_shared_libs.cmake
Normal file
5
Tests/RunCMake/interface_library/no_shared_libs.cmake
Normal file
@ -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…
x
Reference in New Issue
Block a user