CMake: Improve installation on Linux

Install setup header, wx-config and wxrc. Make wx-config executable.
Add renamed files and symbolic links to uninstall target.
This commit is contained in:
Maarten Bent
2018-12-02 17:34:20 +01:00
parent c80aecbfc1
commit c0544afcd7
3 changed files with 46 additions and 1 deletions

View File

@@ -17,8 +17,24 @@ if(wxUSE_XRC)
wx_exe_link_libraries(wxrc xml)
endif()
wx_exe_link_libraries(wxrc base)
# TODO: install
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
if(UNIX)
wx_install(TARGETS wxrc RUNTIME DESTINATION "bin")
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E rename \
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
)"
)
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
)"
)
endif()
endif()
# TODO: build targets for other utils