QT 5.11 finally removes the qt5_use_modules macro. Instead target_link_libraries with the Qt5::Lib added should be used. Since we already use that in one place, it should work everywhere. Since the common companion lib already depends on Core, widges and multimedia components that link against it, also implicitly link against those libraries.
32 lines
687 B
CMake
32 lines
687 B
CMake
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
set(generaledit_NAMES
|
|
generaledit
|
|
generalsetup
|
|
trainer
|
|
hardware
|
|
)
|
|
|
|
set(generaledit_SRCS
|
|
calibration.cpp
|
|
)
|
|
|
|
set(generaledit_HDRS
|
|
calibration.h
|
|
)
|
|
|
|
set(generaledit_UIS
|
|
)
|
|
|
|
foreach(name ${generaledit_NAMES})
|
|
set(generaledit_SRCS ${generaledit_SRCS} ${name}.cpp)
|
|
set(generaledit_HDRS ${generaledit_HDRS} ${name}.h)
|
|
set(generaledit_UIS ${generaledit_UIS} ${name}.ui)
|
|
endforeach()
|
|
|
|
qt5_wrap_ui(generaledit_SRCS ${generaledit_UIS})
|
|
qt5_wrap_cpp(generaledit_SRCS ${generaledit_HDRS})
|
|
|
|
add_library(generaledit ${generaledit_SRCS})
|
|
target_link_libraries(generaledit PRIVATE ${CPN_COMMON_LIB} Qt5::Multimedia)
|