blob: 8b0d72a4961715767a8000d8b8a5d7c96bfe92b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
cmake_minimum_required(VERSION 3.13) # CMake version check
project(lockin) # Create project "simple_example"
set(CMAKE_CXX_STANDARD 17) # Enable c++17 standard (20 would not work)
add_definitions(-DQT_NO_VERSION_TAGGING)
# do not use: -Wstrict-overflow=2 # disaster for Qt include-files
SET(CMAKE_CXX_FLAGS "-g2 -fPIC -Wall" )
set(CMAKE_AUTOMOC ON) # hackish module object compiler
# All the .cxx source files of the project:
file(STRINGS sources.txt SOURCE_FILES)
# Add executable target with source files listed in SOURCE_FILES variable
add_executable(lockin ${SOURCE_FILES})
target_link_libraries(lockin "-lQt5Gui -lQt5Core -lQt5Widgets -lqwt-qt5")
target_link_libraries(lockin "-lasound -lgsl")
target_include_directories(lockin PUBLIC
/usr/include/x86_64-linux-gnu/qt5/
/usr/include/x86_64-linux-gnu/qt5/QtWidgets
/usr/include/x86_64-linux-gnu/qt5/QtGui
/usr/include/x86_64-linux-gnu/qt5/QtCore
/usr/include/qwt/
)
############ find_package(ALSA) # not necessary, not helpful AFAICT
find_package(Qt5 COMPONENTS Widgets) # necessary
include(CMakePrintHelpers)
message("files: a b c ${SOURCE_FILES}")
cmake_print_variables(SOURCE_FILES)
|