You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

58 lines
1.4 KiB

cmake_minimum_required(VERSION 3.17)
project(voice_toolkit)
# Config
set(build_lib OFF)
# End config
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 20)
set(EXECUTABLE_OUTPUT_PATH build/)
if (${build_lib})
add_definitions(-DPROJECT_LIBRARY)
file(GLOB_RECURSE FILES
src/util.cpp
src/audio/*.cpp
# Libs we use
libs/*.c
libs/*.cpp
)
include_directories(include/ libs/)
add_library(voice_toolkit SHARED ${FILES})
target_link_libraries(voice_toolkit PRIVATE portaudiocpp SoundTouch) # IDK how to make this a static link
else()
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
file(GLOB_RECURSE FILES
# This is needed for QT, don't question it.
include/*.*
# Sauce
src/*.*
# Libs we use
libs/*.*
# Autogenerated UI
# src/ui/mainwindow.ui
)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/)
find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
find_package(Qwt REQUIRED)
include_directories(include/ libs/ ${QT})
add_executable(voice_toolkit ${FILES})
target_link_libraries(voice_toolkit PRIVATE portaudiocpp Qt5::Widgets Qt5::Core qwt fftw3 SoundTouch) # IDK how to make this a static link
endif()