modernized the cmake <-> Qt handling.
This commit is contained in:
parent
c5e5bddd10
commit
3a1247e3ec
@ -1,9 +1,11 @@
|
|||||||
#--- mupp for Qt > 5.0 --------------------------------------------------------
|
#--- mupp for Qt = 5.x --------------------------------------------------------
|
||||||
|
|
||||||
#--- Find includes in corresponding build directories -------------------------
|
#--- Find includes in corresponding build directories -------------------------
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
#--- instruct CMake to run moc automatically when needed ----------------------
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
#--- define mupp version ------------------------------------------------------
|
#--- define mupp version ------------------------------------------------------
|
||||||
set(mupp_VERSION 1.0.0)
|
set(mupp_VERSION 1.0.0)
|
||||||
@ -34,9 +36,6 @@ add_custom_target(
|
|||||||
|
|
||||||
add_subdirectory(plotter)
|
add_subdirectory(plotter)
|
||||||
|
|
||||||
qt5_add_resources(qrc_mupp.cpp mupp.qrc)
|
|
||||||
set_property(SOURCE qrc_mupp.cpp PROPERTY SKIP_AUTOMOC ON) # needed for cmake 3.x
|
|
||||||
|
|
||||||
set(GENERATED_HEADER_FILES
|
set(GENERATED_HEADER_FILES
|
||||||
mupp_version.h
|
mupp_version.h
|
||||||
)
|
)
|
||||||
@ -55,10 +54,10 @@ if (APPLE)
|
|||||||
set(RESOURCE_FILES icons/mupp.icns)
|
set(RESOURCE_FILES icons/mupp.icns)
|
||||||
add_executable(mupp
|
add_executable(mupp
|
||||||
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
|
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
|
||||||
qrc_mupp.cpp ${RESOURCE_FILES}
|
mupp.qrc ${RESOURCE_FILES}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(mupp ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES} qrc_mupp.cpp)
|
add_executable(mupp ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES} mupp.qrc)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
@ -89,7 +88,7 @@ target_include_directories(mupp
|
|||||||
)
|
)
|
||||||
|
|
||||||
#--- use the Widgets and XML modules from Qt5 ---------------------------------
|
#--- use the Widgets and XML modules from Qt5 ---------------------------------
|
||||||
target_link_libraries(mupp Qt5::Widgets Qt5::Xml)
|
target_link_libraries(mupp PRIVATE Qt5::Widgets Qt5::Xml)
|
||||||
|
|
||||||
#--- if macOS make an app rather than just a command line executable ----------
|
#--- if macOS make an app rather than just a command line executable ----------
|
||||||
set_target_properties(mupp PROPERTIES
|
set_target_properties(mupp PROPERTIES
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#--- musrStep for Qt > 5.0 ----------------------------------------------------
|
#--- musrStep for Qt = 5.x ----------------------------------------------------
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
if (IS_GIT_REPO)
|
if (IS_GIT_REPO)
|
||||||
@ -7,6 +7,13 @@ else (IS_GIT_REPO)
|
|||||||
set(HAVE_GIT_REV_H "")
|
set(HAVE_GIT_REV_H "")
|
||||||
endif (IS_GIT_REPO)
|
endif (IS_GIT_REPO)
|
||||||
|
|
||||||
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(qt_libs Qt5::Core Qt5::Widgets Qt5::Svg)
|
set(qt_libs Qt5::Core Qt5::Widgets Qt5::Svg)
|
||||||
|
|
||||||
set(musrStep_src
|
set(musrStep_src
|
||||||
@ -14,34 +21,17 @@ set(musrStep_src
|
|||||||
musrStep.cpp
|
musrStep.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
#[==[
|
|
||||||
# as35 currently CMAKE_AUTOUIC -> ON doesn't work since it requires the ui-files
|
|
||||||
# in the same directory as the cpp-files.
|
|
||||||
# Create code from a list of Qt designer ui files
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
#]==]
|
|
||||||
set(CMAKE_AUTOUIC OFF)
|
|
||||||
|
|
||||||
# add qt/rcc
|
|
||||||
qt5_add_resources(musrStep_rcc musrStep.qrc)
|
|
||||||
|
|
||||||
# remove generated files from automoc and autouic
|
|
||||||
set_property(SOURCE qrc_musrStep.cpp PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
|
|
||||||
set(macosx_icon icons/musrStep.icns)
|
set(macosx_icon icons/musrStep.icns)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
add_executable(musrStep MACOSX_BUNDLE
|
add_executable(musrStep MACOSX_BUNDLE
|
||||||
${musrStep_src}
|
${musrStep_src}
|
||||||
${musrStep_rcc}
|
musrStep.qrc
|
||||||
${macosx_icon}
|
${macosx_icon}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(musrStep
|
add_executable(musrStep
|
||||||
${musrStep_src}
|
${musrStep_src}
|
||||||
${musrStep_rcc}
|
musrStep.qrc
|
||||||
)
|
)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
@ -59,7 +49,7 @@ target_compile_options(musrStep
|
|||||||
"${HAVE_GIT_REV_H}"
|
"${HAVE_GIT_REV_H}"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(musrStep ${qt_libs})
|
target_link_libraries(musrStep PRIVATE ${qt_libs})
|
||||||
|
|
||||||
#--- installation info --------------------------------------------------------
|
#--- installation info --------------------------------------------------------
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#--- musrWiz for Qt > 5.0 -----------------------------------------------------
|
#--- musrWiz for Qt = 5.x -----------------------------------------------------
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
if (IS_GIT_REPO)
|
if (IS_GIT_REPO)
|
||||||
@ -7,6 +7,13 @@ else (IS_GIT_REPO)
|
|||||||
set(HAVE_GIT_REV_H "")
|
set(HAVE_GIT_REV_H "")
|
||||||
endif (IS_GIT_REPO)
|
endif (IS_GIT_REPO)
|
||||||
|
|
||||||
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(qt_libs Qt5::Core Qt5::Widgets Qt5::Svg Qt5::Xml)
|
set(qt_libs Qt5::Core Qt5::Widgets Qt5::Svg Qt5::Xml)
|
||||||
|
|
||||||
set(musrWiz_src
|
set(musrWiz_src
|
||||||
@ -18,34 +25,17 @@ set(musrWiz_src
|
|||||||
musrWiz.cpp
|
musrWiz.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
#[==[
|
|
||||||
# as35 currently CMAKE_AUTOUIC -> ON doesn't work since it requires the ui-files
|
|
||||||
# in the same directory as the cpp-files.
|
|
||||||
# Create code from a list of Qt designer ui files
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
#]==]
|
|
||||||
set(CMAKE_AUTOUIC OFF)
|
|
||||||
|
|
||||||
# add qt/rcc
|
|
||||||
qt5_add_resources(musrWiz_rcc musrWiz.qrc)
|
|
||||||
|
|
||||||
# remove generated files from automoc and autouic
|
|
||||||
set_property(SOURCE qrc_musrWiz.cpp PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
|
|
||||||
set(macosx_icon icons/musrWiz.icns)
|
set(macosx_icon icons/musrWiz.icns)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
add_executable(musrWiz MACOSX_BUNDLE
|
add_executable(musrWiz MACOSX_BUNDLE
|
||||||
${musrWiz_src}
|
${musrWiz_src}
|
||||||
${musrWiz_rcc}
|
musrWiz.qrc
|
||||||
${macosx_icon}
|
${macosx_icon}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(musrWiz
|
add_executable(musrWiz
|
||||||
${musrWiz_src}
|
${musrWiz_src}
|
||||||
${musrWiz_rcc}
|
musrWiz.qrc
|
||||||
)
|
)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
@ -63,7 +53,7 @@ target_compile_options(musrWiz
|
|||||||
"${HAVE_GIT_REV_H}"
|
"${HAVE_GIT_REV_H}"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(musrWiz ${qt_libs})
|
target_link_libraries(musrWiz PRIVATE ${qt_libs})
|
||||||
|
|
||||||
#--- installation info --------------------------------------------------------
|
#--- installation info --------------------------------------------------------
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#--- musredit for Qt > 5.0 ----------------------------------------------------
|
#--- musredit for Qt = 5.x ----------------------------------------------------
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
if (IS_GIT_REPO)
|
if (IS_GIT_REPO)
|
||||||
@ -7,6 +7,17 @@ else (IS_GIT_REPO)
|
|||||||
set(HAVE_GIT_REV_H "")
|
set(HAVE_GIT_REV_H "")
|
||||||
endif (IS_GIT_REPO)
|
endif (IS_GIT_REPO)
|
||||||
|
|
||||||
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- create code from a list of Qt designer ui files --------------------------
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
#--- add forms to the uic search path -----------------------------------------
|
||||||
|
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/forms)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(qt_libs Qt5::Core Qt5::Widgets Qt5::Network Qt5::Xml Qt5::Svg Qt5::PrintSupport)
|
set(qt_libs Qt5::Core Qt5::Widgets Qt5::Network Qt5::Xml Qt5::Svg Qt5::PrintSupport)
|
||||||
|
|
||||||
set(musredit_src
|
set(musredit_src
|
||||||
@ -55,42 +66,6 @@ set(musredit_ui
|
|||||||
forms/PChangeDefaultPathsDialog.ui
|
forms/PChangeDefaultPathsDialog.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
#[==[
|
|
||||||
# as35 currently CMAKE_AUTOUIC -> ON doesn't work since it requires the ui-files
|
|
||||||
# in the same directory as the cpp-files.
|
|
||||||
# Create code from a list of Qt designer ui files
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
#]==]
|
|
||||||
set(CMAKE_AUTOUIC OFF)
|
|
||||||
|
|
||||||
# call qt/uic
|
|
||||||
qt5_wrap_ui(out_ui ${musredit_ui})
|
|
||||||
# add qt/rcc
|
|
||||||
qt5_add_resources(musredit_rcc musredit.qrc)
|
|
||||||
|
|
||||||
# remove generated files from automoc and autouic
|
|
||||||
set_property(SOURCE ui_PFindDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PReplaceDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PReplaceConfirmationDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PMusrEditAbout.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PPrefsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetMusrFTOptionsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetTitleBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetParameterBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetTheoryBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetFunctionsBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetAsymmetryRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetSingleHistoRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetNonMusrRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetFourierBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetPlotBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PMsr2DataDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PChangeDefaultPathsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE qrc_musredit.cpp PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
if (${CMAKE_HOST_SYSTEM_VERSION} GREATER_EQUAL "20.3.0")
|
if (${CMAKE_HOST_SYSTEM_VERSION} GREATER_EQUAL "20.3.0")
|
||||||
set(macosx_icon_name musredit-bigsur.icns)
|
set(macosx_icon_name musredit-bigsur.icns)
|
||||||
@ -101,15 +76,15 @@ if (APPLE)
|
|||||||
message(STATUS "macosx_icon: ${macosx_icon}")
|
message(STATUS "macosx_icon: ${macosx_icon}")
|
||||||
add_executable(musredit MACOSX_BUNDLE
|
add_executable(musredit MACOSX_BUNDLE
|
||||||
${musredit_src}
|
${musredit_src}
|
||||||
${out_ui}
|
${musredit_ui}
|
||||||
${musredit_rcc}
|
musredit.qrc
|
||||||
${macosx_icon}
|
${macosx_icon}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(musredit
|
add_executable(musredit
|
||||||
${musredit_src}
|
${musredit_src}
|
||||||
${out_ui}
|
${musredit_ui}
|
||||||
${musredit_rcc}
|
musredit.qrc
|
||||||
)
|
)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
@ -128,7 +103,7 @@ target_compile_options(musredit
|
|||||||
"${HAVE_GIT_REV_H}"
|
"${HAVE_GIT_REV_H}"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(musredit ${qt_libs})
|
target_link_libraries(musredit PRIVATE ${qt_libs})
|
||||||
|
|
||||||
#--- installation info --------------------------------------------------------
|
#--- installation info --------------------------------------------------------
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
@ -164,4 +139,3 @@ install(
|
|||||||
${CMAKE_INSTALL_PREFIX}/share/doc/musrfit
|
${CMAKE_INSTALL_PREFIX}/share/doc/musrfit
|
||||||
MESSAGE_NEVER
|
MESSAGE_NEVER
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
#--- mupp for Qt > 6.0 --------------------------------------------------------
|
#--- mupp for Qt = 6.x --------------------------------------------------------
|
||||||
|
|
||||||
#--- Find includes in corresponding build directories -------------------------
|
#--- Find includes in corresponding build directories -------------------------
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
#--- instruct CMake to run moc automatically when needed ----------------------
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
#--- define mupp version ------------------------------------------------------
|
#--- define mupp version ------------------------------------------------------
|
||||||
set(mupp_VERSION 1.0.0)
|
set(mupp_VERSION 1.0.0)
|
||||||
@ -34,9 +36,6 @@ add_custom_target(
|
|||||||
|
|
||||||
add_subdirectory(plotter)
|
add_subdirectory(plotter)
|
||||||
|
|
||||||
qt6_add_resources(qrc_mupp.cpp mupp.qrc)
|
|
||||||
set_property(SOURCE qrc_mupp.cpp PROPERTY SKIP_AUTOMOC ON) # needed for cmake 3.x
|
|
||||||
|
|
||||||
set(GENERATED_HEADER_FILES
|
set(GENERATED_HEADER_FILES
|
||||||
mupp_version.h
|
mupp_version.h
|
||||||
)
|
)
|
||||||
@ -55,10 +54,10 @@ if (APPLE)
|
|||||||
set(RESOURCE_FILES icons/mupp.icns)
|
set(RESOURCE_FILES icons/mupp.icns)
|
||||||
add_executable(mupp
|
add_executable(mupp
|
||||||
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
|
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
|
||||||
qrc_mupp.cpp ${RESOURCE_FILES}
|
mupp.qrc ${RESOURCE_FILES}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(mupp ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES} qrc_mupp.cpp)
|
add_executable(mupp ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES} mupp.qrc)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
@ -89,7 +88,7 @@ target_include_directories(mupp
|
|||||||
)
|
)
|
||||||
|
|
||||||
#--- use the Widgets and XML modules from Qt5 ---------------------------------
|
#--- use the Widgets and XML modules from Qt5 ---------------------------------
|
||||||
target_link_libraries(mupp Qt6::Widgets Qt6::Xml)
|
target_link_libraries(mupp PRIVATE Qt6::Widgets Qt6::Xml)
|
||||||
|
|
||||||
#--- if macOS make an app rather than just a command line executable ----------
|
#--- if macOS make an app rather than just a command line executable ----------
|
||||||
set_target_properties(mupp PROPERTIES
|
set_target_properties(mupp PROPERTIES
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#--- musrStep for Qt > 6.0 ----------------------------------------------------
|
#--- musrStep for Qt = 6.x ----------------------------------------------------
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
if (IS_GIT_REPO)
|
if (IS_GIT_REPO)
|
||||||
@ -7,6 +7,13 @@ else (IS_GIT_REPO)
|
|||||||
set(HAVE_GIT_REV_H "")
|
set(HAVE_GIT_REV_H "")
|
||||||
endif (IS_GIT_REPO)
|
endif (IS_GIT_REPO)
|
||||||
|
|
||||||
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(qt_libs Qt6::Core Qt6::Widgets Qt6::Svg)
|
set(qt_libs Qt6::Core Qt6::Widgets Qt6::Svg)
|
||||||
|
|
||||||
set(musrStep_src
|
set(musrStep_src
|
||||||
@ -14,34 +21,17 @@ set(musrStep_src
|
|||||||
musrStep.cpp
|
musrStep.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
#[==[
|
|
||||||
# as35 currently CMAKE_AUTOUIC -> ON doesn't work since it requires the ui-files
|
|
||||||
# in the same directory as the cpp-files.
|
|
||||||
# Create code from a list of Qt designer ui files
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
#]==]
|
|
||||||
set(CMAKE_AUTOUIC OFF)
|
|
||||||
|
|
||||||
# add qt/rcc
|
|
||||||
qt6_add_resources(musrStep_rcc musrStep.qrc)
|
|
||||||
|
|
||||||
# remove generated files from automoc and autouic
|
|
||||||
set_property(SOURCE qrc_musrStep.cpp PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
|
|
||||||
set(macosx_icon icons/musrStep.icns)
|
set(macosx_icon icons/musrStep.icns)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
add_executable(musrStep MACOSX_BUNDLE
|
add_executable(musrStep MACOSX_BUNDLE
|
||||||
${musrStep_src}
|
${musrStep_src}
|
||||||
${musrStep_rcc}
|
musrStep.qrc
|
||||||
${macosx_icon}
|
${macosx_icon}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(musrStep
|
add_executable(musrStep
|
||||||
${musrStep_src}
|
${musrStep_src}
|
||||||
${musrStep_rcc}
|
musrStep.qrc
|
||||||
)
|
)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
@ -59,7 +49,7 @@ target_compile_options(musrStep
|
|||||||
"${HAVE_GIT_REV_H}"
|
"${HAVE_GIT_REV_H}"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(musrStep ${qt_libs})
|
target_link_libraries(musrStep PRIVATE ${qt_libs})
|
||||||
|
|
||||||
#--- installation info --------------------------------------------------------
|
#--- installation info --------------------------------------------------------
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#--- musrWiz for Qt > 6.0 -----------------------------------------------------
|
#--- musrWiz for Qt = 6.x -----------------------------------------------------
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
if (IS_GIT_REPO)
|
if (IS_GIT_REPO)
|
||||||
@ -7,6 +7,13 @@ else (IS_GIT_REPO)
|
|||||||
set(HAVE_GIT_REV_H "")
|
set(HAVE_GIT_REV_H "")
|
||||||
endif (IS_GIT_REPO)
|
endif (IS_GIT_REPO)
|
||||||
|
|
||||||
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(qt_libs Qt6::Core Qt6::Widgets Qt6::Svg Qt6::Xml)
|
set(qt_libs Qt6::Core Qt6::Widgets Qt6::Svg Qt6::Xml)
|
||||||
|
|
||||||
set(musrWiz_src
|
set(musrWiz_src
|
||||||
@ -18,34 +25,17 @@ set(musrWiz_src
|
|||||||
musrWiz.cpp
|
musrWiz.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
#[==[
|
|
||||||
# as35 currently CMAKE_AUTOUIC -> ON doesn't work since it requires the ui-files
|
|
||||||
# in the same directory as the cpp-files.
|
|
||||||
# Create code from a list of Qt designer ui files
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
#]==]
|
|
||||||
set(CMAKE_AUTOUIC OFF)
|
|
||||||
|
|
||||||
# add qt/rcc
|
|
||||||
qt6_add_resources(musrWiz_rcc musrWiz.qrc)
|
|
||||||
|
|
||||||
# remove generated files from automoc and autouic
|
|
||||||
set_property(SOURCE qrc_musrWiz.cpp PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
|
|
||||||
set(macosx_icon icons/musrWiz.icns)
|
set(macosx_icon icons/musrWiz.icns)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
add_executable(musrWiz MACOSX_BUNDLE
|
add_executable(musrWiz MACOSX_BUNDLE
|
||||||
${musrWiz_src}
|
${musrWiz_src}
|
||||||
${musrWiz_rcc}
|
musrWiz.qrc
|
||||||
${macosx_icon}
|
${macosx_icon}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(musrWiz
|
add_executable(musrWiz
|
||||||
${musrWiz_src}
|
${musrWiz_src}
|
||||||
${musrWiz_rcc}
|
musrWiz.qrc
|
||||||
)
|
)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
@ -63,7 +53,7 @@ target_compile_options(musrWiz
|
|||||||
"${HAVE_GIT_REV_H}"
|
"${HAVE_GIT_REV_H}"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(musrWiz ${qt_libs})
|
target_link_libraries(musrWiz PRIVATE ${qt_libs})
|
||||||
|
|
||||||
#--- installation info --------------------------------------------------------
|
#--- installation info --------------------------------------------------------
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#--- musredit for Qt > 6.0 ----------------------------------------------------
|
#--- musredit for Qt = 6.x ----------------------------------------------------
|
||||||
|
|
||||||
#--- check if project source is repo ------------------------------------------
|
#--- check if project source is repo ------------------------------------------
|
||||||
if (IS_GIT_REPO)
|
if (IS_GIT_REPO)
|
||||||
@ -7,6 +7,17 @@ else (IS_GIT_REPO)
|
|||||||
set(HAVE_GIT_REV_H "")
|
set(HAVE_GIT_REV_H "")
|
||||||
endif (IS_GIT_REPO)
|
endif (IS_GIT_REPO)
|
||||||
|
|
||||||
|
#--- instruct CMake to run moc automatically when needed ----------------------
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
#--- create code from a list of Qt designer ui files --------------------------
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
#--- add forms to the uic search path -----------------------------------------
|
||||||
|
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/forms)
|
||||||
|
#--- deal with the resources --------------------------------------------------
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(qt_libs Qt6::Core Qt6::Widgets Qt6::Network Qt6::Xml Qt6::Svg Qt6::PrintSupport)
|
set(qt_libs Qt6::Core Qt6::Widgets Qt6::Network Qt6::Xml Qt6::Svg Qt6::PrintSupport)
|
||||||
|
|
||||||
set(musredit_src
|
set(musredit_src
|
||||||
@ -55,42 +66,6 @@ set(musredit_ui
|
|||||||
forms/PChangeDefaultPathsDialog.ui
|
forms/PChangeDefaultPathsDialog.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
# Instruct CMake to run moc automatically when needed
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
#[==[
|
|
||||||
# as35 currently CMAKE_AUTOUIC -> ON doesn't work since it requires the ui-files
|
|
||||||
# in the same directory as the cpp-files.
|
|
||||||
# Create code from a list of Qt designer ui files
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
#]==]
|
|
||||||
set(CMAKE_AUTOUIC OFF)
|
|
||||||
|
|
||||||
# call qt/uic
|
|
||||||
qt6_wrap_ui(out_ui ${musredit_ui})
|
|
||||||
# add qt/rcc
|
|
||||||
qt6_add_resources(musredit_rcc musredit.qrc)
|
|
||||||
|
|
||||||
# remove generated files from automoc and autouic
|
|
||||||
set_property(SOURCE ui_PFindDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PReplaceDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PReplaceConfirmationDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PMusrEditAbout.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PPrefsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetMusrFTOptionsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetTitleBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetParameterBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetTheoryBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetFunctionsBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetAsymmetryRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetSingleHistoRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetNonMusrRunBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetFourierBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PGetPlotBlockDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PMsr2DataDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE ui_PChangeDefaultPathsDialog.h PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
set_property(SOURCE qrc_musredit.cpp PROPERTY SKIP_AUTOMOC ON)
|
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
if (${CMAKE_HOST_SYSTEM_VERSION} GREATER_EQUAL "20.3.0")
|
if (${CMAKE_HOST_SYSTEM_VERSION} GREATER_EQUAL "20.3.0")
|
||||||
set(macosx_icon_name musredit-bigsur.icns)
|
set(macosx_icon_name musredit-bigsur.icns)
|
||||||
@ -100,15 +75,15 @@ if (APPLE)
|
|||||||
set(macosx_icon "icons/${macosx_icon_name}")
|
set(macosx_icon "icons/${macosx_icon_name}")
|
||||||
add_executable(musredit MACOSX_BUNDLE
|
add_executable(musredit MACOSX_BUNDLE
|
||||||
${musredit_src}
|
${musredit_src}
|
||||||
${out_ui}
|
${musredit_ui}
|
||||||
${musredit_rcc}
|
musredit.qrc
|
||||||
${macosx_icon}
|
${macosx_icon}
|
||||||
)
|
)
|
||||||
else (APPLE)
|
else (APPLE)
|
||||||
add_executable(musredit
|
add_executable(musredit
|
||||||
${musredit_src}
|
${musredit_src}
|
||||||
${out_ui}
|
${musredit_ui}
|
||||||
${musredit_rcc}
|
musredit.qrc
|
||||||
)
|
)
|
||||||
endif (APPLE)
|
endif (APPLE)
|
||||||
|
|
||||||
@ -127,7 +102,7 @@ target_compile_options(musredit
|
|||||||
"${HAVE_GIT_REV_H}"
|
"${HAVE_GIT_REV_H}"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(musredit ${qt_libs})
|
target_link_libraries(musredit PRIVATE ${qt_libs})
|
||||||
|
|
||||||
#--- installation info --------------------------------------------------------
|
#--- installation info --------------------------------------------------------
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user