CMake: Export WXUSINGDLL for shared builds
Always define WXUSINGDLL for plugins.
This commit is contained in:
parent
87465898f3
commit
4999c1c84b
@ -354,9 +354,10 @@ function(wx_set_target_properties target_name)
|
||||
elseif(NOT wxTARGET_IS_PLUGIN)
|
||||
target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL_${target_name_upper})
|
||||
endif()
|
||||
if(NOT target_name_short STREQUAL "base")
|
||||
target_compile_definitions(${target_name} PRIVATE WXUSINGDLL)
|
||||
endif()
|
||||
target_compile_definitions(${target_name} INTERFACE WXUSINGDLL)
|
||||
endif()
|
||||
if(wxTARGET_IS_PLUGIN OR (wxBUILD_SHARED AND NOT target_name_short STREQUAL "base"))
|
||||
target_compile_definitions(${target_name} PRIVATE WXUSINGDLL)
|
||||
endif()
|
||||
|
||||
# Link common libraries
|
||||
@ -824,9 +825,6 @@ function(wx_add name group)
|
||||
if(APP_LIBRARIES)
|
||||
wx_exe_link_libraries(${target_name} ${APP_LIBRARIES})
|
||||
endif()
|
||||
if(wxBUILD_SHARED)
|
||||
target_compile_definitions(${target_name} PRIVATE WXUSINGDLL)
|
||||
endif()
|
||||
if(APP_DEFINITIONS)
|
||||
target_compile_definitions(${target_name} PRIVATE ${APP_DEFINITIONS})
|
||||
endif()
|
||||
|
@ -10,9 +10,6 @@
|
||||
if(wxUSE_XRC)
|
||||
add_executable(wxrc "${wxSOURCE_DIR}/utils/wxrc/wxrc.cpp")
|
||||
wx_set_common_target_properties(wxrc)
|
||||
if(wxBUILD_SHARED)
|
||||
target_compile_definitions(wxrc PRIVATE WXUSINGDLL)
|
||||
endif()
|
||||
if(wxUSE_XML)
|
||||
wx_exe_link_libraries(wxrc wxxml)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user