-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
executable file
·68 lines (47 loc) · 1.53 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# CMake project file.
# Set everything up before commencing with any builds.
# At the time, Gavin was using version 3.7.
cmake_minimum_required(VERSION 3.9)
project(x264_cbr_test)
message(STATUS "Project: ${PROJECT_NAME}")
message(STATUS "Platform: ${CMAKE_SYSTEM_NAME} (${CMAKE_SYSTEM})")
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
################################################################
# Find Thread - used implicitly by GTest
find_package(Threads REQUIRED)
include(ExternalProject)
if (CMAKE_COMPILER_IS_GNUCXX)
add_definitions(/DUNICODE)
# Options added:
# 1. Increase warning level
# 2. Make all warnings into errors.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
endif()
# Set the location where our binaries will be stored.
# WARN/TODO: Not quite right, because .lib or .a files should
# not go in the bin folder!
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
link_directories(${CMAKE_BINARY_DIR}/bin)
# Local header files here ONLY
set(TARGET_HPP
)
# Local source files here
set(TARGET_CPP
main.cpp
)
# Define an executable
add_executable(x264_cbr ${TARGET_HPP} ${TARGET_CPP})
target_link_libraries(x264_cbr
avformat
avcodec
avutil
x264
pthread
dl
)