-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
30 lines (23 loc) · 895 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.12)
project(MQA_identifier)
# for android build, unhide this
# set(Boost_USE_STATIC_LIBS OFF)
# set(Boost_USE_DEBUG_LIBS OFF)
# set(Boost_USE_RELEASE_LIBS ON)
# set(Boost_USE_MULTITHREADED ON)
# set(Boost_USE_STATIC_RUNTIME OFF)
# find_package(Boost 1.75.0 COMPONENTS date_time filesystem system )
set(CMAKE_CXX_STANDARD 17)
if (NOT (MSVC))
set(CMAKE_CXX_FLAGS "-O2 -fpermissive")
else (NOT (MSVC))
set(CMAKE_CXX_FLAGS "/O2")
STRING(REPLACE "/O2" "/Od" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
endif ()
find_library(FLAC++_LIBRARIES NAMES FLAC++ FLAC)
find_library(ogg NAMES ogg)
add_executable(${PROJECT_NAME} main.cc)
# for android build, hide this
target_link_libraries(${PROJECT_NAME} FLAC++ FLAC ogg)
# for android build, unhide this
# target_link_libraries(${PROJECT_NAME} FLAC++ FLAC ogg ${Boost_LIBRARIES})