mirror of
https://github.com/ra3xdh/qucs_s
synced 2025-03-28 21:13:26 +00:00
remove versionless cmake function usage
This commit is contained in:
parent
888feebceb
commit
b6cc1916d4
@ -265,7 +265,14 @@ optimizedialog.h
|
||||
spicefile.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
|
||||
IF(QT_VERSION_MAJOR EQUAL 6)
|
||||
qt6_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})
|
||||
else()
|
||||
qt5_wrap_cpp(COMPONENTS_MOC_SRCS ${COMPONENTS_MOC_HDRS})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
ADD_LIBRARY(components STATIC ${COMPONENTS_HDRS} ${COMPONENTS_SRCS} ${COMPONENTS_MOC_SRCS} )
|
||||
|
@ -33,7 +33,12 @@ SET(DIAGRAMS_MOC_HDRS
|
||||
diagramdialog.h
|
||||
markerdialog.h
|
||||
)
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
|
||||
qt_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} )
|
||||
IF(QT_VERSION_MAJOR EQUAL 6)
|
||||
qt6_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} )
|
||||
else()
|
||||
qt5_wrap_cpp( DIAGRAMS_MOC_SRCS ${DIAGRAMS_MOC_HDRS} )
|
||||
endif()
|
||||
|
||||
ADD_LIBRARY(diagrams STATIC ${DIAGRAMS_HDRS} ${DIAGRAMS_SRCS} ${DIAGRAMS_MOC_SRCS})
|
||||
|
@ -69,7 +69,15 @@ SET(DIALOGS_UIC_HDRS
|
||||
searchdialog.ui
|
||||
)
|
||||
|
||||
QT_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} )
|
||||
QT_WRAP_UI( DIALOGS_UIC_SRCS ${DIALOGS_UIC_HDRS} )
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
|
||||
IF(QT_VERSION_MAJOR EQUAL 6)
|
||||
QT6_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} )
|
||||
QT6_WRAP_UI( DIALOGS_UIC_SRCS ${DIALOGS_UIC_HDRS} )
|
||||
else()
|
||||
QT5_WRAP_CPP( DIALOGS_MOC_SRCS ${DIALOGS_MOC_HDRS} )
|
||||
QT5_WRAP_UI( DIALOGS_UIC_SRCS ${DIALOGS_UIC_HDRS} )
|
||||
|
||||
endif()
|
||||
|
||||
ADD_LIBRARY(dialogs STATIC ${DIALOGS_HDRS} ${DIALOGS_SRCS} ${DIALOGS_MOC_SRCS} ${DIALOGS_UIC_SRCS})
|
||||
|
@ -43,8 +43,14 @@ customsimdialog.h
|
||||
simsettingsdialog.h
|
||||
)
|
||||
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
|
||||
IF(QT_VERSION_MAJOR EQUAL 6)
|
||||
QT6_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} )
|
||||
else()
|
||||
QT5_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} )
|
||||
endif()
|
||||
|
||||
QT_WRAP_CPP( EXTSIMKERNELS_MOC_SRCS ${EXTSIMKERNELS_MOC_HDRS} )
|
||||
|
||||
ADD_LIBRARY(extsimkernels STATIC ${EXTSIMKERNELS_HDRS} ${EXTSIMKERNELS_SRCS} ${EXTSIMKERNELS_MOC_SRCS})
|
||||
|
||||
|
@ -38,7 +38,13 @@ graphictextdialog.h
|
||||
id_dialog.h
|
||||
)
|
||||
|
||||
QT_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} )
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
|
||||
IF(QT_VERSION_MAJOR EQUAL 6)
|
||||
QT6_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} )
|
||||
else()
|
||||
QT5_WRAP_CPP( PAINTINGS_MOC_SRCS ${PAINTINGS_MOC_HDRS} )
|
||||
endif()
|
||||
|
||||
ADD_LIBRARY(paintings STATIC ${PAINTINGS_HDRS} ${PAINTINGS_SRCS} ${PAINTINGS_MOC_SRCS} )
|
||||
|
||||
|
@ -30,6 +30,12 @@ q3scrollview.h
|
||||
q3frame.h
|
||||
)
|
||||
|
||||
qt_wrap_cpp( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} )
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
|
||||
IF(QT_VERSION_MAJOR EQUAL 6)
|
||||
QT6_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} )
|
||||
else()
|
||||
QT5_WRAP_CPP( QT3_COMPAT_SRCS ${QT3_COMPAT_MOC_HDRS} )
|
||||
endif()
|
||||
|
||||
ADD_LIBRARY(qt3_compat STATIC ${QT3_COMPAT_HDRS} ${QT3_COMPAT_SRCS})
|
||||
|
@ -13,12 +13,21 @@ file (GLOB TRANSLATIONS_FILES qucs_*.ts)
|
||||
|
||||
# WARNING: make clean might delete the source .ts files! Danger!
|
||||
option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts" "OFF")
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
|
||||
IF(QT_VERSION_MAJOR EQUAL 6)
|
||||
IF (UPDATE_TRANSLATIONS)
|
||||
QT_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES})
|
||||
QT6_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES})
|
||||
ELSE (UPDATE_TRANSLATIONS)
|
||||
QT_ADD_TRANSLATION ( QM_FILES ${TRANSLATIONS_FILES})
|
||||
QT6_ADD_TRANSLATION ( QM_FILES ${TRANSLATIONS_FILES})
|
||||
ENDIF (UPDATE_TRANSLATIONS)
|
||||
ELSE()
|
||||
IF (UPDATE_TRANSLATIONS)
|
||||
QT5_CREATE_TRANSLATION ( QM_FILES ${FILES_TO_TRANSLATE} ${TRANSLATIONS_FILES})
|
||||
ELSE (UPDATE_TRANSLATIONS)
|
||||
QT5_ADD_TRANSLATION ( QM_FILES ${TRANSLATIONS_FILES})
|
||||
ENDIF (UPDATE_TRANSLATIONS)
|
||||
ENDIF()
|
||||
|
||||
ADD_CUSTOM_TARGET (translations ALL DEPENDS ${QM_FILES})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user