mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 15:27:13 +02:00
added comments
This commit is contained in:
@ -1,3 +1,6 @@
|
|||||||
|
#inspired by: https://github.com/ericriff/qwt/blob/master/CMakeLists.txt
|
||||||
|
|
||||||
|
# Build a static version of qwt from tar file
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
project(qwt)
|
project(qwt)
|
||||||
set(PROJECT_VERSION 6.1.5)
|
set(PROJECT_VERSION 6.1.5)
|
||||||
@ -5,7 +8,7 @@ set(PROJECT_VERSION 6.1.5)
|
|||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
#Extract qwt sources from the supplied source file
|
# Extract qwt sources from the supplied source file
|
||||||
set(INTERNALQWTDIR "qwt-source/")
|
set(INTERNALQWTDIR "qwt-source/")
|
||||||
set(QWTBASE ${CMAKE_CURRENT_BINARY_DIR}/${INTERNALQWTDIR})
|
set(QWTBASE ${CMAKE_CURRENT_BINARY_DIR}/${INTERNALQWTDIR})
|
||||||
file(MAKE_DIRECTORY ${QWTBASE})
|
file(MAKE_DIRECTORY ${QWTBASE})
|
||||||
@ -17,7 +20,7 @@ if(ret AND NOT ret EQUAL 0)
|
|||||||
message( FATAL_ERROR "Could not unpack qwt")
|
message( FATAL_ERROR "Could not unpack qwt")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# # Without this define moc files are not included and linking of examples fails.
|
# Without this define moc files are not included and linking of examples fails.
|
||||||
add_definitions(-DQWT_MOC_INCLUDE)
|
add_definitions(-DQWT_MOC_INCLUDE)
|
||||||
|
|
||||||
find_package(Qt5 REQUIRED
|
find_package(Qt5 REQUIRED
|
||||||
@ -31,10 +34,9 @@ find_package(Qt5 REQUIRED
|
|||||||
Svg
|
Svg
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
file(GLOB QWT_SOURCES ${QWTBASE}src/*.cpp)
|
file(GLOB QWT_SOURCES ${QWTBASE}src/*.cpp)
|
||||||
file(GLOB QWT_HEADERS ${QWTBASE}src/*.h)
|
file(GLOB QWT_HEADERS ${QWTBASE}src/*.h)
|
||||||
|
|
||||||
|
|
||||||
add_library(qwt STATIC ${QWT_SOURCES} ${QWT_HEADERS} )
|
add_library(qwt STATIC ${QWT_SOURCES} ${QWT_HEADERS} )
|
||||||
target_include_directories(qwt PUBLIC
|
target_include_directories(qwt PUBLIC
|
||||||
$<BUILD_INTERFACE:${QWTBASE}/src>
|
$<BUILD_INTERFACE:${QWTBASE}/src>
|
||||||
@ -50,4 +52,6 @@ target_link_libraries(qwt PUBLIC
|
|||||||
Qt5::Svg
|
Qt5::Svg
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Disable all warnings in QWT since we don’t want to patch the library
|
||||||
target_compile_options(qwt PRIVATE -w)
|
target_compile_options(qwt PRIVATE -w)
|
Reference in New Issue
Block a user