CMake: Fix library directory when using MinGW
This was broken in b102afc316
(CMake: Don't include generator expression in
wxPLATFORM_LIB_DIR, 2021-10-17).
And for clarity, always add a '/' after directories.
Closes #19305
This commit is contained in:
parent
a7f5e3c5c3
commit
4f0d9d3346
@ -26,9 +26,9 @@ else()
|
||||
set(WIN32_MSVC_NAMING 0)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(WIN32_MSVC_NAMING)
|
||||
# Generator expression to not create different Debug and Release directories
|
||||
set(MSVC_DIR_FIX "$<1:/>")
|
||||
set(GEN_EXPR_DIR_FIX "$<1:/>")
|
||||
endif()
|
||||
|
||||
# This function adds a list of headers to a variable while prepending
|
||||
@ -102,9 +102,9 @@ function(wx_set_common_target_properties target_name)
|
||||
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
|
||||
|
||||
set_target_properties(${target_name} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${MSVC_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${MSVC_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${MSVC_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}/${GEN_EXPR_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}/${GEN_EXPR_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}/${GEN_EXPR_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
)
|
||||
|
||||
if(wxBUILD_PIC)
|
||||
@ -422,9 +422,9 @@ macro(wx_add_library name)
|
||||
set(runtime_dir "bin")
|
||||
endif()
|
||||
wx_install(TARGETS ${name}
|
||||
LIBRARY DESTINATION "lib${MSVC_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
ARCHIVE DESTINATION "lib${MSVC_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
RUNTIME DESTINATION "${runtime_dir}${MSVC_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
LIBRARY DESTINATION "lib/${GEN_EXPR_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
ARCHIVE DESTINATION "lib/${GEN_EXPR_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
RUNTIME DESTINATION "${runtime_dir}/${GEN_EXPR_DIR_FIX}${wxPLATFORM_LIB_DIR}"
|
||||
BUNDLE DESTINATION Applications/wxWidgets
|
||||
)
|
||||
endif()
|
||||
@ -579,7 +579,7 @@ function(wx_set_builtin_target_properties target_name)
|
||||
|
||||
wx_set_common_target_properties(${target_name} DEFAULT_WARNINGS)
|
||||
if(NOT wxBUILD_SHARED)
|
||||
wx_install(TARGETS ${name} ARCHIVE DESTINATION "lib${MSVC_DIR_FIX}${wxPLATFORM_LIB_DIR}")
|
||||
wx_install(TARGETS ${name} ARCHIVE DESTINATION "lib/${GEN_EXPR_DIR_FIX}${wxPLATFORM_LIB_DIR}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user