mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-25 04:45:58 +00:00
cmake: rpath take 2, re previous commit [eea16e], use global
property `ZINT_LIBDIR` hack to set in both CLI and GUI, whether macOS or not (ticket #346, props Hagen Röwer and Bryce Harrison)
This commit is contained in:
@@ -147,6 +147,9 @@ if(NOT HAVE_GETOPT_LONG_ONLY)
|
|||||||
add_subdirectory(getopt)
|
add_subdirectory(getopt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# For setting rpath in frontend and frontend_qt
|
||||||
|
set_property(GLOBAL PROPERTY ZINT_LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
|
||||||
add_subdirectory(backend)
|
add_subdirectory(backend)
|
||||||
if(ZINT_FRONTEND)
|
if(ZINT_FRONTEND)
|
||||||
add_subdirectory(frontend)
|
add_subdirectory(frontend)
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ Bugs
|
|||||||
- CLI: fix "--scalexdimdp" X-dim inch units being divided instead of multiplied
|
- CLI: fix "--scalexdimdp" X-dim inch units being divided instead of multiplied
|
||||||
on conversion to mm
|
on conversion to mm
|
||||||
- DOTCODE: fix not emitting FNC1 (signalling not GS1) if input is just 2 digits
|
- DOTCODE: fix not emitting FNC1 (signalling not GS1) if input is just 2 digits
|
||||||
- CMake: set `rpath` of CLI on macOS install (ticket #346, props Hagen Röwer)
|
- CMake: set `rpath` of CLI/GUI on install (ticket #346, props Hagen Röwer and
|
||||||
|
Bryce Harrison)
|
||||||
- AZTEC: fix ECC to be at least advertised percentages (ticket #347, props
|
- AZTEC: fix ECC to be at least advertised percentages (ticket #347, props
|
||||||
Francois Grieu)
|
Francois Grieu)
|
||||||
|
|
||||||
|
|||||||
12
README.macos
12
README.macos
@@ -1,5 +1,6 @@
|
|||||||
% README.macos 2025-10-02
|
% README.macos 2026-01-21
|
||||||
% Tested on macOS 12.7.2 Monterey VirtualBox (thanks to https://github.com/myspaghetti/macos-virtualbox)
|
% Tested on macOS 12.7.2 Monterey VirtualBox (thanks to https://github.com/myspaghetti/macos-virtualbox)
|
||||||
|
% and macOS 14.8.3 Sonoma (thanks to https://github.com/kholia/OSX-KVM)
|
||||||
|
|
||||||
1. Prerequisites for building zint and zint-qt
|
1. Prerequisites for building zint and zint-qt
|
||||||
==============================================
|
==============================================
|
||||||
@@ -10,14 +11,11 @@ First if not already installed, install the developer command line tools
|
|||||||
|
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
|
|
||||||
This can take a (very) long time. Once done, check for updates by selecting "System Preferences" > "Software Update",
|
(On Monterey but not Sonoma or later, the latest versions of the command line tools may not have "/usr/include"
|
||||||
and clicking "Advanced" and "OK" (with all the checkboxes set) to trigger the check. If updates are found, install.
|
in the standard C include directories. Set SDKROOT to overcome this (https://stackoverflow.com/a/60002595/664741)
|
||||||
This can also take a long time.
|
|
||||||
|
|
||||||
With the latest versions of the command line tools, "/usr/include" no longer has the standard C include files. Set
|
|
||||||
SDKROOT to overcome this (https://stackoverflow.com/a/60002595/664741)
|
|
||||||
|
|
||||||
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
|
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
|
||||||
|
)
|
||||||
|
|
||||||
Install Homebrew (unless already installed)
|
Install Homebrew (unless already installed)
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,8 @@ if(NOT HAVE_GETOPT_LONG_ONLY)
|
|||||||
target_link_libraries(${PROJECT_NAME} zint_bundled_getopt)
|
target_link_libraries(${PROJECT_NAME} zint_bundled_getopt)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE AND NOT CMAKE_INSTALL_RPATH)
|
get_property(libdir GLOBAL PROPERTY ZINT_LIBDIR)
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${libdir}")
|
||||||
endif()
|
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME)
|
install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Copyright (C) 2008 by BogDan Vatra < bogdan@licentia.eu >
|
# Copyright (C) 2008 by BogDan Vatra < bogdan@licentia.eu >
|
||||||
# Copyright (C) 2009-2025 Robin Stuart <rstuart114@gmail.com>
|
# Copyright (C) 2009-2026 Robin Stuart <rstuart114@gmail.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
# vim: set ts=4 sw=4 et :
|
# vim: set ts=4 sw=4 et :
|
||||||
|
|
||||||
@@ -52,4 +52,7 @@ target_link_libraries(${PROJECT_NAME} QZint
|
|||||||
Qt${QT_VERSION_MAJOR}::UiTools Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Svg
|
Qt${QT_VERSION_MAJOR}::UiTools Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Svg
|
||||||
Qt${QT_VERSION_MAJOR}::Core)
|
Qt${QT_VERSION_MAJOR}::Core)
|
||||||
|
|
||||||
|
get_property(libdir GLOBAL PROPERTY ZINT_LIBDIR)
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${libdir}")
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME)
|
install(TARGETS ${PROJECT_NAME} DESTINATION "${CMAKE_INSTALL_BINDIR}" RUNTIME)
|
||||||
|
|||||||
Reference in New Issue
Block a user