forked from Iunusov/ShoutVST
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
43 lines (33 loc) · 1.55 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.0)
project (ShoutVST_Solution)
set(CMAKE_BUILD_TYPE Release)
#set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_CXX_FLAGS_DEBUG "-g")
if((${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC))
set(MYFLAGS "/O2 /WX- /MT")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MYFLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MYFLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MYFLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${MYFLAGS}")
include(CheckSymbolExists)
check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
if(NOT HAVE_SNPRINTF)
add_definitions(-Dsnprintf=_snprintf)
endif()
endif()
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(MYFLAGS "-Ofast -Wl,--no-undefined")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MYFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MYFLAGS}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${MYFLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MYFLAGS}")
ENDIF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/comp_definitions.h.in ${CMAKE_CURRENT_BINARY_DIR}/comp_definitions.h @ONLY)
include_directories (${CMAKE_CURRENT_BINARY_DIR})
#some properties
SET(WITH_OGG ON CACHE BOOL "libshout: WITH_OGG option")
SET(WITH_VORBIS ON CACHE BOOL "libshout: WITH_VORBIS option")
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/deps)
set_property(TARGET fltk PROPERTY POSITION_INDEPENDENT_CODE ON)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/FLUID)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/CMake)