CMake: wxUSE_VISIBILITY is non windows option now & -Wl,--exclude-libs=ALL has been added in MinGW case.

This commit is contained in:
Deamhan
2019-07-15 19:13:58 +03:00
parent 1d52cf1d2d
commit f4a0ac93e3
2 changed files with 4 additions and 8 deletions

View File

@@ -44,13 +44,7 @@ if(MSVC)
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
if(wxBUILD_USE_STATIC_RUNTIME)
if(MINGW)
set(STATIC_LINKER_FLAGS " -static")
set(EXCLUDED_LIBS gcc_eh
pthread
)
foreach(lib ${EXCLUDED_LIBS})
wx_string_append(STATIC_LINKER_FLAGS " -Wl,--exclude-libs=lib${lib}.a")
endforeach()
set(STATIC_LINKER_FLAGS " -static -Wl,--exclude-libs=ALL")
else()
set(STATIC_LINKER_FLAGS " -static-libgcc -static-libstdc++")
endif()

View File

@@ -59,7 +59,9 @@ if(NOT WIN32)
endif()
wx_option(wxUSE_COMPILER_TLS "enable use of compiler TLS support")
if(NOT WIN32)
wx_option(wxUSE_VISIBILITY "use of ELF symbols visibility")
endif()
wx_option(wxUSE_UNSAFE_WXSTRING_CONV "provide unsafe implicit conversions in wxString to const char* or std::string")
wx_option(wxUSE_REPRODUCIBLE_BUILD "enable reproducable build" OFF)