SampleReceiver/CMakeLists.txt
Wiesner András a6be70fb7b - MultiStreamOscilloscope first implementation done
- SlopeTrigger -> EdgeTrigger
- working Python example included
- libwfr.h introduced for easy including all libwfr headers
- ChannelBuffer is now template
- Semaphore moved
2022-05-05 22:19:52 +02:00

52 lines
1.6 KiB
CMake

cmake_minimum_required(VERSION 3.16)
SET(APP_NAME wfr_app)
project(${APP_NAME})
set(CMAKE_CXX_STANDARD 17)
add_executable(${APP_NAME}
main.cpp
src/ALSADevice.cpp
src/ALSADevice.h
src/MemoryPool.cpp
src/MemoryPool.h
libwfr/src/utils/Semaphore.h
libwfr/src/utils/Semaphore.cpp)
find_package(Threads REQUIRED)
if (THREADS_FOUND)
target_link_libraries(${APP_NAME} Threads::Threads)
endif (THREADS_FOUND)
find_package(ALSA REQUIRED)
if (ALSA_FOUND)
target_include_directories(${APP_NAME} PUBLIC ${ALSA_INCLUDE_DIRS})
target_link_libraries(${APP_NAME} ${ALSA_LIBRARIES})
endif (ALSA_FOUND)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
if (GTK3_FOUND)
target_include_directories(${APP_NAME} PUBLIC ${GTK3_INCLUDE_DIRS})
target_link_directories(${APP_NAME} PUBLIC ${GTK3_LIBRARY_DIRS})
add_definitions(${GTK3_CFLAGS_OTHER})
target_link_libraries(${APP_NAME} ${GTK3_LIBRARIES})
endif(GTK3_FOUND)
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0)
if (GTKMM_FOUND)
target_include_directories(${APP_NAME} PUBLIC ${GTKMM_INCLUDE_DIRS})
target_link_directories(${APP_NAME} PUBLIC ${GTKMM_LIBRARY_DIRS})
target_link_libraries(${APP_NAME} ${GTKMM_LIBRARIES})
endif(GTKMM_FOUND)
add_dependencies(${APP_NAME} wfr)
target_link_libraries(${APP_NAME} wfr)
install(TARGETS ${APP_NAME} RUNTIME DESTINATION ${PROJECT_SOURCE_DIR}/runtime ARCHIVE DESTINATION ${PROJECT_SOURCE_DIR}/runtime)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-rdynamic")
add_subdirectory(libwfr)
add_subdirectory(python)