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)
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#--- 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)
|
||||
|
||||
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||
@@ -29,7 +29,7 @@ if (APPLE)
|
||||
${macosx_icon}
|
||||
)
|
||||
else (APPLE)
|
||||
add_executable(musrStep
|
||||
add_executable(musrStep
|
||||
${musrStep_src}
|
||||
musrStep.qrc
|
||||
)
|
||||
@@ -46,7 +46,7 @@ target_include_directories(musrStep
|
||||
|
||||
target_compile_options(musrStep
|
||||
PRIVATE
|
||||
"${HAVE_GIT_REV_H}"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
)
|
||||
|
||||
target_link_libraries(musrStep PRIVATE ${qt_libs})
|
||||
@@ -62,6 +62,7 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrStep"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
INSTALL_RPATH "${Qt6_DIR}/../.."
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
@@ -74,4 +75,3 @@ else (APPLE)
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#--- 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)
|
||||
|
||||
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||
@@ -30,10 +30,10 @@ if (APPLE)
|
||||
add_executable(musrWiz MACOSX_BUNDLE
|
||||
${musrWiz_src}
|
||||
musrWiz.qrc
|
||||
${macosx_icon}
|
||||
${macosx_icon}
|
||||
)
|
||||
else (APPLE)
|
||||
add_executable(musrWiz
|
||||
add_executable(musrWiz
|
||||
${musrWiz_src}
|
||||
musrWiz.qrc
|
||||
)
|
||||
@@ -50,7 +50,7 @@ target_include_directories(musrWiz
|
||||
|
||||
target_compile_options(musrWiz
|
||||
PRIVATE
|
||||
"${HAVE_GIT_REV_H}"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
)
|
||||
|
||||
target_link_libraries(musrWiz PRIVATE ${qt_libs})
|
||||
@@ -66,6 +66,7 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrWiz"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
INSTALL_RPATH "${Qt6_DIR}/../.."
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#--- 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)
|
||||
|
||||
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||
@@ -63,7 +63,7 @@ set(musredit_ui
|
||||
forms/PGetFourierBlockDialog.ui
|
||||
forms/PGetPlotBlockDialog.ui
|
||||
forms/PMsr2DataDialog.ui
|
||||
forms/PChangeDefaultPathsDialog.ui
|
||||
forms/PChangeDefaultPathsDialog.ui
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
@@ -72,7 +72,7 @@ if (APPLE)
|
||||
else()
|
||||
set(macosx_icon_name musredit.icns)
|
||||
endif()
|
||||
set(macosx_icon "icons/${macosx_icon_name}")
|
||||
set(macosx_icon "icons/${macosx_icon_name}")
|
||||
add_executable(musredit MACOSX_BUNDLE
|
||||
${musredit_src}
|
||||
${musredit_ui}
|
||||
@@ -80,7 +80,7 @@ if (APPLE)
|
||||
${macosx_icon}
|
||||
)
|
||||
else (APPLE)
|
||||
add_executable(musredit
|
||||
add_executable(musredit
|
||||
${musredit_src}
|
||||
${musredit_ui}
|
||||
musredit.qrc
|
||||
@@ -99,7 +99,7 @@ target_include_directories(musredit
|
||||
|
||||
target_compile_options(musredit
|
||||
PRIVATE
|
||||
"${HAVE_GIT_REV_H}"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
)
|
||||
|
||||
target_link_libraries(musredit PRIVATE ${qt_libs})
|
||||
@@ -115,6 +115,7 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musredit"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
INSTALL_RPATH "${Qt6_DIR}/../.."
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
@@ -138,4 +139,3 @@ install(
|
||||
${CMAKE_INSTALL_PREFIX}/share/doc/musrfit
|
||||
MESSAGE_NEVER
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user