76 lines
2.0 KiB
CMake
76 lines
2.0 KiB
CMake
cmake_minimum_required(VERSION 3.18..3.27)
|
|
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
|
|
)
|
|
|
|
CPMAddPackage(
|
|
NAME Event
|
|
URL https://git.redacted.cc/josh/Event/archive/Release-11.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}
|
|
src/linux/PulseSubsystem.cpp
|
|
src/linux/SoundSubsystem.cpp)
|
|
add_executable(ReMixer-Test main.cpp)
|
|
|
|
set_target_properties(ReMixer PROPERTIES LINKER_LANGUAGE CXX)
|
|
set_target_properties(ReMixer-Test PROPERTIES LINKER_LANGUAGE CXX)
|
|
|
|
target_include_directories(ReMixer PUBLIC ${Event_SOURCE_DIR}/include)
|
|
target_link_libraries(ReMixer PUBLIC Event)
|
|
|
|
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)
|
|
|
|
add_executable(pacat pacat_simple.cpp
|
|
pacat_advanced.cpp
|
|
src/windows/ReMixer.cpp
|
|
include/ReMixer/PulseSubsystem.h)
|
|
target_link_libraries(pacat pulse-simple pulse)
|
|
|
|
add_executable(vorbis_decode vorbis_decode.cpp)
|
|
target_link_libraries(vorbis_decode vorbisfile vorbis)
|
|
|
|
add_executable(pacat_advanced pacat_advanced.cpp)
|
|
target_link_libraries(pacat_advanced pulse)
|
|
|
|
if (WIN32)
|
|
add_executable(winsoundcat winsoundcat.cpp)
|
|
target_link_libraries(winsoundcat)
|
|
endif() |