-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (37 loc) · 1.49 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
44
45
46
47
cmake_minimum_required(VERSION 3.0)
project(Streamer)
set(CPACK_PACKAGE_NAME "Streamer")
set(CPACK_PACKAGE_VERSION_MAJOR 1)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH 0)
set(CMAKE_WARNINGE_MAKEFILE OFF)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
message ("Compiling will be for x64")
set (x64 1)
elseif()
message ("Compiling will be for x86")
set (x64 0)
endif()
if(BUILD_TYPE EQUAL "Debug")
set(CMAKE_BUILD_TYPE Debug)
elseif(BUILD_TYPE EQUAL "Release")
set(CMAKE_BUILD_TYPE Reelase)
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/live555/BasicUsageEnvironment/include
${CMAKE_CURRENT_SOURCE_DIR}/live555/groupsock/include
${CMAKE_CURRENT_SOURCE_DIR}/live555/liveMedia/include
${CMAKE_CURRENT_SOURCE_DIR}/live555/UsageEnvironment/include)
file(GLOB SOURCES "*.c*")
file(GLOB HEADERS "*.h*")
file(GLOB LIVE555_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/live555/BasicUsageEnvironment/*.c*"
"${CMAKE_CURRENT_SOURCE_DIR}/live555/groupsock/*.c*"
"${CMAKE_CURRENT_SOURCE_DIR}/live555/liveMedia/*.c*"
"${CMAKE_CURRENT_SOURCE_DIR}/live555/UsageEnvironment/*.c*")
source_group("live555" FILES ${LIVE555_SOURCES})
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
endif()
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${LIVE555_SOURCES})
target_link_libraries(${PROJECT_NAME} debug "ws2_32.lib" optimized "ws2_32.lib")