Files
ReMixer/CMakeLists.txt
2024-08-06 22:36:34 -04:00

51 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.18)
project(ReMixer
VERSION 1.0
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(cmake/CPM.cmake)
CPMAddPackage(
NAME uuid
URL https://git.redacted.cc/Redacted/uuid/archive/Release-1.zip
)
if (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
message(FATAL_ERROR "In-Source builds are not allowed")
endif()
file(GLOB_RECURSE HEADERS "include/ReMixer/*.h")
if(UNIX AND NOT APPLE)
file(GLOB_RECURSE SOURCES "src/shared/*.cpp" "src/linux/*.cpp")
endif()
if(WIN32)
file(GLOB_RECURSE HEADERS "include/ReMixer/*.h")
file(GLOB_RECURSE SOURCES "src/shared/*.cpp" "src/windows/*.cpp")
endif()
include_directories("include" ${uuid_SOURCE_DIR}/include)
add_library(ReMixer ${SOURCES})
add_executable(ReMixer-Test main.cpp)
set_target_properties(ReMixer PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(ReMixer-Test PROPERTIES LINKER_LANGUAGE CXX)
if(UNIX AND NOT APPLE)
target_link_libraries(ReMixer PUBLIC vorbisfile vorbis pulse-simple pulse uuid)
endif()
if(WIN32)
#target_link_libraries(Remixer PUBLIC)
endif()
target_link_libraries(ReMixer-Test PUBLIC ReMixer)