2016-09-25 16:19:39 -04:00
|
|
|
#############################################################################
|
|
|
|
# Name: build/cmake/utils/CMakeLists.txt
|
|
|
|
# Purpose: CMake script for utilities
|
|
|
|
# Author: Tobias Taschner
|
|
|
|
# Created: 2016-10-21
|
|
|
|
# Copyright: (c) 2016 wxWidgets development team
|
|
|
|
# Licence: wxWindows licence
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
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()
|
2018-01-19 18:55:43 -05:00
|
|
|
if(wxUSE_XML)
|
2020-05-17 13:41:44 -04:00
|
|
|
wx_exe_link_libraries(wxrc wxxml)
|
2018-01-19 18:55:43 -05:00
|
|
|
endif()
|
2020-05-17 13:41:44 -04:00
|
|
|
wx_exe_link_libraries(wxrc wxbase)
|
2018-12-02 11:34:20 -05:00
|
|
|
|
2016-09-25 16:19:39 -04:00
|
|
|
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
|
2018-12-02 11:34:20 -05:00
|
|
|
|
2020-06-18 13:59:09 -04:00
|
|
|
wx_install(TARGETS wxrc
|
|
|
|
RUNTIME DESTINATION "bin"
|
|
|
|
BUNDLE DESTINATION "bin"
|
|
|
|
)
|
|
|
|
|
|
|
|
if(IPHONE)
|
|
|
|
set(EXE_SUFFIX ".app")
|
|
|
|
else()
|
|
|
|
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
|
|
|
endif()
|
|
|
|
|
2020-02-16 09:23:03 -05:00
|
|
|
if(NOT MSVC)
|
2018-12-02 11:34:20 -05:00
|
|
|
install(CODE "execute_process( \
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E rename \
|
2020-06-18 13:59:09 -04:00
|
|
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
|
|
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
2018-12-02 11:34:20 -05:00
|
|
|
)"
|
|
|
|
)
|
|
|
|
install(CODE "execute_process( \
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
2020-06-18 13:59:09 -04:00
|
|
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
|
|
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
2018-12-02 11:34:20 -05:00
|
|
|
)"
|
|
|
|
)
|
|
|
|
endif()
|
2016-09-25 16:19:39 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# TODO: build targets for other utils
|