Open madebr opened 2 years ago
I suspect this is a trivial fix since the abi.json
already describes the STL requirement.
As an aside, it would also be useful to check inside the SDL2Config.cmake
config file whether the CXX
language is actually enabled.
Because if it is not, the build process will fail at a later time.
See e.g. this issue I created earlier this year.
I think the cmake config file might need something like:
include(CheckLanguage)
check_language(CXX)
if(NOT CMAKE_CXX_COMPILER)
message(WARNING "SDL2 requires CXX, but it not enabled.")
endif()
CheckLanguage
documentation
Or skip the warning and do enable_language(CXX)
yourself.
I think, instead of LINKER_LANGUAGE
, the imported targets should set IMPORTED_LINK_INTERFACE_LANGUAGES
.
Describe the bug When a static library uses a C++ STL, the linker language of a library should be set to
CXX
.To Reproduce Steps to reproduce the behavior:
staticmodule::staticlib
). Make sure this library uses symbols from the STL. e.g.std::string
, ...mygame
library will fail because the C linker will not find the c++ STL symbols.Expected behavior Linking just works.
Additional context Prefab should add a
LINKER_LANGUAGE
property: e.g.