Skip to content

Commit

Permalink
update CMakelist.text
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmao31 committed Dec 15, 2022
1 parent 3928927 commit c9f4071
Showing 1 changed file with 78 additions and 6 deletions.
84 changes: 78 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,101 @@
# INSTALL ( TARGETS ts_mixer DESTINATION lib )


# cmake_minimum_required(VERSION 3.10)
# project(unitest_mixer)

# set(CMAKE_CXX_STANDARD 17)
# set(CMAKE_CXX_FLAGS "-g") # 调试信息 set(CMAKE_CXX_FLAGS "-Wall") # 开启所有警告
# set(CMAKE_BUILD_TYPE "Debug")
# set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -fPIC -O0 -Wall -g2 -ggdb")

# ADD_DEFINITIONS(-DWEBRTC_LINUX -DWEBRTC_POSIX)
# #add_definitions(-DABSL_STRINGS_STRING_VIEW_H_)

# AUX_SOURCE_DIRECTORY(. mixer)

# include_directories(.)
# include_directories(third_party/abseil-cpp)

# add_executable(unitest_mixer
# unitest_mixer.cc
# MixerImpl.cpp
# ${mixer}
# )

# target_link_libraries(unitest_mixer
# /home/fengmao/cowa_audio/backup_git/webrtc_mixer/libts_mixer.a
# pthread
# )


cmake_minimum_required(VERSION 3.10)
project(unitest_mixer)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-g") # 调试信息 set(CMAKE_CXX_FLAGS "-Wall") # 开启所有警告
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -fPIC -O0 -Wall -g2 -ggdb")

ADD_DEFINITIONS(-DWEBRTC_LINUX -DWEBRTC_POSIX)
#add_definitions(-DABSL_STRINGS_STRING_VIEW_H_)

AUX_SOURCE_DIRECTORY(. mixer)
ADD_DEFINITIONS(-DWEBRTC_LINUX -DWEBRTC_POSIX -DWEBRTC_APM_DEBUG_DUMP=0)

if(NOT CMAKE_SYSTEM_NAME MATCHES Windows)
ADD_DEFINITIONS(-DWEBRTC_POSIX)
endif()

if(CMAKE_SYSTEM_NAME MATCHES iOS)
message(==============now is iOS================)
ADD_DEFINITIONS(-DWEBRTC_IOS)
ADD_DEFINITIONS(-DWEBRTC_MAC)
elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
message(==============now is Mac================)
ADD_DEFINITIONS(-DWEBRTC_MAC)
elseif(CMAKE_SYSTEM_NAME MATCHES Windows)
message(==============now is Windows================)
ADD_DEFINITIONS(-DWEBRTC_WIN)
ADD_DEFINITIONS(-DNOMINMAX)
ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)
elseif(CMAKE_SYSTEM_NAME MATCHES Android)
message(==============now is Android================)
ADD_DEFINITIONS(-DWEBRTC_LINUX)
ADD_DEFINITIONS(-DWEBRTC_ANDROID)
elseif(CMAKE_SYSTEM_NAME MATCHES Linux)
message(==============now is linux================)
ADD_DEFINITIONS(-DWEBRTC_LINUX)
endif()

add_subdirectory(third_party/abseil-cpp)
add_subdirectory(api)
add_subdirectory(audio)
add_subdirectory(modules)
add_subdirectory(common_audio)
add_subdirectory(rtc_base)
add_subdirectory(system_wrappers)

AUX_SOURCE_DIRECTORY(.
mixer)

include_directories(.)
include_directories(third_party/abseil-cpp)



add_executable(unitest_mixer
unitest_mixer.cc
MixerImpl.cpp
${mixer}
)

target_link_libraries(unitest_mixer
/home/fengmao/cowa_audio/backup_git/webrtc_mixer/libts_mixer.a
#/home/fengmao/cowa_audio/backup_git/webrtc_mixer/libts_mixer.a
absl::throw_delegate absl::strings
modules_audio_mixer
rtc_base
api
audio
modules_audio_process
system_wrappers
common_audio
pthread
)
)

0 comments on commit c9f4071

Please sign in to comment.