Changeset View
Standalone View
src/qt/CMakeLists.txt
Show First 20 Lines • Show All 305 Lines • ▼ Show 20 Lines | if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||||
set(EMPTY_LPROJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/empty.lproj") | set(EMPTY_LPROJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/empty.lproj") | ||||
file(TOUCH "${EMPTY_LPROJ_FILE}") | 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}" | "${INFO_PLIST_STRINGS_PATH}" | ||||
"${EMPTY_LPROJ_FILE}" | "${EMPTY_LPROJ_FILE}" | ||||
) | ) | ||||
deadalnix: Why do we need a bitcoin-qt target and this? This is a bit strange, because on every target… | |||||
FabienAuthorUnsubmitted Done Inline ActionsI see them as 2 different things. The bitcoin-qt target is still a valid target (and is not broken) on OSX and builds the bitcoin-qt executable the same way that it is done on Linux. Fabien: I see them as 2 different things. The `bitcoin-qt` target is still a valid target (and is not… | |||||
deadalnixUnsubmitted Not Done Inline ActionsIt is a second executable that contains the exact same code, but in addition contains various OSX metadata. If we are on OSX, then that should be bitcoin-qt. Just likeon Windows, bitcoin-qt is enriched with some windows specific metadata. deadalnix: It is a second executable that contains the exact same code, but in addition contains various… | |||||
target_link_libraries(BitcoinABC-Qt bitcoin-qt-base) | target_link_libraries(BitcoinABC-Qt bitcoin-qt-base) | ||||
string(JOIN ";" BITCOINQT_BUNDLE_RESOURCES | string(JOIN ";" BITCOINQT_BUNDLE_RESOURCES | ||||
"${BITCOINQT_BUNDLE_ICON}" | "${BITCOINQT_BUNDLE_ICON}" | ||||
"${EMPTY_LPROJ_FILE}" | "${EMPTY_LPROJ_FILE}" | ||||
) | ) | ||||
set_target_properties(BitcoinABC-Qt PROPERTIES | set_target_properties(BitcoinABC-Qt PROPERTIES | ||||
Show All 13 Lines | if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||||
# an example demonstrating this behavior (see the appres.txt file): | # an example demonstrating this behavior (see the appres.txt file): | ||||
# https://cmake.org/cmake/help/latest/prop_tgt/RESOURCE.html | # https://cmake.org/cmake/help/latest/prop_tgt/RESOURCE.html | ||||
set_source_files_properties( | set_source_files_properties( | ||||
"${INFO_PLIST_STRINGS_PATH}" | "${INFO_PLIST_STRINGS_PATH}" | ||||
PROPERTIES | PROPERTIES | ||||
MACOSX_PACKAGE_LOCATION "Resources/${INFO_PLIST_STRINGS_FILE}" | MACOSX_PACKAGE_LOCATION "Resources/${INFO_PLIST_STRINGS_FILE}" | ||||
) | ) | ||||
# Always strip the application bundle binary. | |||||
# Note that the arguments to the `strip` command are OSX specific. | |||||
add_custom_command( | |||||
TARGET BitcoinABC-Qt | |||||
POST_BUILD | |||||
COMMAND "${CMAKE_STRIP}" -u -r "$<TARGET_FILE:BitcoinABC-Qt>" | |||||
) | |||||
deadalnixUnsubmitted Not Done Inline ActionsI find this a bit disappointing, as it prevent dependency tracking. If the command doesn't allow for it, maybe simpl copying the file and then running it in place could do the trick. deadalnix: I find this a bit disappointing, as it prevent dependency tracking. If the command doesn't… | |||||
FabienAuthorUnsubmitted Done Inline ActionsMy understanding is that this signature of add_custom_command doesn't break the dependency tracking. Fabien: My understanding is that this signature of `add_custom_command` doesn't break the dependency… | |||||
include(DoOrFail) | include(DoOrFail) | ||||
find_program_or_fail(CMAKE_INSTALL_NAME_TOOL "install_name_tool") | find_program_or_fail(CMAKE_INSTALL_NAME_TOOL "install_name_tool") | ||||
find_program_or_fail(CMAKE_OTOOL "otool") | find_program_or_fail(CMAKE_OTOOL "otool") | ||||
set(QT_INSTALLER_SUPPORTED_LANGUAGES | set(QT_INSTALLER_SUPPORTED_LANGUAGES | ||||
"da" | "da" | ||||
"de" | "de" | ||||
"es" | "es" | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |
Why do we need a bitcoin-qt target and this? This is a bit strange, because on every target, ninja bitcoin-qt will build bitcoin-qt, but on OSX, it will actually build a broken version of bitcoin-qt and I need to do ninja bitcoinABC-Qt to actually get the real deal. I think it is better to fix this rather than pile more on top of it.