improvement dealing with rpath on macOS.
This commit is contained in:
@@ -42,18 +42,18 @@ set(GENERATED_HEADER_FILES
|
||||
set_property(SOURCE mupp_version.h PROPERTY SKIP_AUTOMOC ON) # needed for cmake 3.x
|
||||
|
||||
set(MUPP_SOURCE_FILES
|
||||
mupp.cpp
|
||||
PmuppAdmin.cpp
|
||||
mupp.cpp
|
||||
PmuppAdmin.cpp
|
||||
Pmupp.cpp
|
||||
PmuppScript.cpp
|
||||
PmuppScript.cpp
|
||||
PmuppGui.cpp
|
||||
PVarDialog.cpp
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
set(RESOURCE_FILES icons/mupp.icns)
|
||||
add_executable(mupp
|
||||
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
|
||||
add_executable(mupp
|
||||
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
|
||||
mupp.qrc ${RESOURCE_FILES}
|
||||
)
|
||||
else (APPLE)
|
||||
@@ -62,24 +62,24 @@ endif (APPLE)
|
||||
|
||||
#--- check if project source is repo ------------------------------------------
|
||||
if (IS_GIT_REPO)
|
||||
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
|
||||
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
|
||||
else (IS_GIT_REPO)
|
||||
set(HAVE_GIT_REV_H "")
|
||||
set(HAVE_GIT_REV_H "")
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- compiler option to workaround a little cast problem for some
|
||||
#--- compiler option to workaround a little cast problem for some
|
||||
#--- boost/compiler combinations ----------------------------------------------
|
||||
target_compile_options(mupp
|
||||
PRIVATE
|
||||
"-fpermissive"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
)
|
||||
|
||||
#--- add the variable related sources -----------------------------------------
|
||||
add_subdirectory(var)
|
||||
|
||||
#--- add the necessary header includes ----------------------------------------
|
||||
target_include_directories(mupp
|
||||
target_include_directories(mupp
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../..>
|
||||
@@ -104,6 +104,7 @@ if (APPLE)
|
||||
MACOSX_FRAMEWORK_IDENTIFIER ch.psi.mupp
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE "${RESOURCE_FILES}"
|
||||
INSTALL_RPATH "${Qt6_DIR}/../.."
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user