Changeset View
Changeset View
Standalone View
Standalone View
src/qt/CMakeLists.txt
Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Lines | |||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||||
set(BITCOINQT_BUNDLE_ICON "res/icons/bitcoin.icns") | set(BITCOINQT_BUNDLE_ICON "res/icons/bitcoin.icns") | ||||
get_filename_component(BITCOINQT_BUNDLE_ICON_NAME | get_filename_component(BITCOINQT_BUNDLE_ICON_NAME | ||||
"${BITCOINQT_BUNDLE_ICON}" | "${BITCOINQT_BUNDLE_ICON}" | ||||
NAME | NAME | ||||
) | ) | ||||
set(INFO_PLIST_STRINGS_FILE "Base.lproj/InfoPlist.strings") | |||||
set(INFO_PLIST_STRINGS_PATH "${CMAKE_CURRENT_BINARY_DIR}/${INFO_PLIST_STRINGS_FILE}") | |||||
file(WRITE | |||||
"${INFO_PLIST_STRINGS_PATH}" | |||||
"{ CFBundleDisplayName = \"${PACKAGE_NAME}\"; CFBundleName = \"${PACKAGE_NAME}\"; }" | |||||
) | |||||
set(EMPTY_LPROJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/empty.lproj") | |||||
file(TOUCH "${EMPTY_LPROJ_FILE}") | |||||
add_executable(BitcoinABC-Qt MACOSX_BUNDLE | add_executable(BitcoinABC-Qt MACOSX_BUNDLE | ||||
bitcoin.cpp | bitcoin.cpp | ||||
"${BITCOINQT_BUNDLE_ICON}" | "${BITCOINQT_BUNDLE_ICON}" | ||||
"${INFO_PLIST_STRINGS_PATH}" | |||||
"${EMPTY_LPROJ_FILE}" | |||||
) | ) | ||||
target_link_libraries(BitcoinABC-Qt bitcoin-qt-base) | target_link_libraries(BitcoinABC-Qt bitcoin-qt-base) | ||||
string(JOIN ";" BITCOINQT_BUNDLE_RESOURCES | |||||
"${BITCOINQT_BUNDLE_ICON}" | |||||
"${EMPTY_LPROJ_FILE}" | |||||
) | |||||
set_target_properties(BitcoinABC-Qt PROPERTIES | set_target_properties(BitcoinABC-Qt PROPERTIES | ||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/share/qt/Info.plist.cmake.in" | MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/share/qt/Info.plist.cmake.in" | ||||
MACOSX_BUNDLE_BUNDLE_NAME "BitcoinABC-Qt" | MACOSX_BUNDLE_BUNDLE_NAME "BitcoinABC-Qt" | ||||
MACOSX_BUNDLE_BUNDLE_VERSION "${bitcoin-abc_VERSION}" | MACOSX_BUNDLE_BUNDLE_VERSION "${bitcoin-abc_VERSION}" | ||||
MACOSX_BUNDLE_GUI_IDENTIFIER "org.bitcoinabc.BitcoinABC-Qt" | MACOSX_BUNDLE_GUI_IDENTIFIER "org.bitcoinabc.BitcoinABC-Qt" | ||||
MACOSX_BUNDLE_ICON_FILE "${BITCOINQT_BUNDLE_ICON_NAME}" | MACOSX_BUNDLE_ICON_FILE "${BITCOINQT_BUNDLE_ICON_NAME}" | ||||
MACOSX_BUNDLE_INFO_STRING "${bitcoin-abc_VERSION}, Copyright © 2009-${COPYRIGHT_YEAR} ${COPYRIGHT_HOLDERS_FINAL}" | MACOSX_BUNDLE_INFO_STRING "${bitcoin-abc_VERSION}, Copyright © 2009-${COPYRIGHT_YEAR} ${COPYRIGHT_HOLDERS_FINAL}" | ||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${bitcoin-abc_VERSION}" | MACOSX_BUNDLE_LONG_VERSION_STRING "${bitcoin-abc_VERSION}" | ||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${bitcoin-abc_VERSION}" | MACOSX_BUNDLE_SHORT_VERSION_STRING "${bitcoin-abc_VERSION}" | ||||
RESOURCE "${BITCOINQT_BUNDLE_ICON}" | RESOURCE "${BITCOINQT_BUNDLE_RESOURCES}" | ||||
) | |||||
# The InfoPlist.strings files should be located in a resource subdirectory. | |||||
# This is not supported by the RESOURCE property and require the use of the | |||||
# MACOSX_PACKAGE_LOCATION property instead. The RESOURCE documentation has | |||||
# an example demonstrating this behavior (see the appres.txt file): | |||||
# https://cmake.org/cmake/help/latest/prop_tgt/RESOURCE.html | |||||
set_source_files_properties( | |||||
"${INFO_PLIST_STRINGS_PATH}" | |||||
PROPERTIES | |||||
MACOSX_PACKAGE_LOCATION "Resources/${INFO_PLIST_STRINGS_FILE}" | |||||
) | ) | ||||
endif() | endif() | ||||
# Test tests | # Test tests | ||||
add_subdirectory(test) | add_subdirectory(test) |