CMake: Improve wxrc name
Include the version and flavour in the target name, no need to rename anymore. Add the wxrc symlink to extra uninstall files, not the actual target name.
This commit is contained in:
@@ -66,9 +66,15 @@ if(NOT TARGET ${UNINST_NAME})
|
||||
# these symlinks are not included in the install manifest
|
||||
set(WX_EXTRA_UNINSTALL_FILES)
|
||||
if(NOT WIN32_MSVC_NAMING)
|
||||
if(IPHONE)
|
||||
set(EXE_SUFFIX ".app")
|
||||
else()
|
||||
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
endif()
|
||||
|
||||
set(WX_EXTRA_UNINSTALL_FILES
|
||||
"${CMAKE_INSTALL_PREFIX}/bin/wx-config"
|
||||
"${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
|
||||
"${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@@ -18,6 +18,14 @@ if(wxUSE_XRC)
|
||||
endif()
|
||||
wx_exe_link_libraries(wxrc wxbase)
|
||||
|
||||
set(wxrc_output_name "wxrc")
|
||||
if(NOT WIN32_MSVC_NAMING)
|
||||
wx_get_flavour(lib_flavour "-")
|
||||
set(wxrc_output_name "wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${lib_flavour}")
|
||||
endif()
|
||||
|
||||
set_target_properties(wxrc PROPERTIES OUTPUT_NAME ${wxrc_output_name})
|
||||
|
||||
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
|
||||
|
||||
wx_install(TARGETS wxrc
|
||||
@@ -32,15 +40,9 @@ if(wxUSE_XRC)
|
||||
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
endif()
|
||||
|
||||
install(CODE "execute_process( \
|
||||
COMMAND ${CMAKE_COMMAND} -E rename \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
||||
)"
|
||||
)
|
||||
install(CODE "execute_process( \
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/${wxrc_output_name}${EXE_SUFFIX} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
||||
)"
|
||||
)
|
||||
|
Reference in New Issue
Block a user