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
|
|
|
|
2021-06-06 17:14:22 -04:00
|
|
|
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})
|
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
|
2021-05-24 15:10:14 -04:00
|
|
|
if(NOT WIN32_MSVC_NAMING)
|
|
|
|
if(IPHONE)
|
|
|
|
set(EXE_SUFFIX ".app")
|
|
|
|
else()
|
|
|
|
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
|
|
|
endif()
|
2020-06-18 13:59:09 -04:00
|
|
|
|
2018-12-02 11:34:20 -05:00
|
|
|
install(CODE "execute_process( \
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
2021-06-06 17:14:22 -04:00
|
|
|
${CMAKE_INSTALL_PREFIX}/bin/${wxrc_output_name}${EXE_SUFFIX} \
|
2020-06-18 13:59:09 -04:00
|
|
|
${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
|