forked from abenea/demoinfogo-linux
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
33 lines (27 loc) · 993 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
31
32
cmake_minimum_required(VERSION 3.0)
project(demoinfogo)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
option(RPATH "Hack rpath to $ORIGIN/libs" OFF)
if(RPATH)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,$ORIGIN/libs")
endif()
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIRS} "utfcpp")
add_subdirectory(json_spirit)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
PROTOBUF_GENERATE_CPP(PROTO1_SRCS PROTO1_HDRS
src/netmessages.proto
src/steammessages.proto
src/cstrike15_gcmessages.proto
src/cstrike15_usermessages.proto)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++0x")
add_executable(demoinfogo
src/geometry.cpp
src/demofile.cpp
src/demofiledump.cpp
src/demoinfogo.cpp
src/demofilebitbuf.cpp
src/demofilepropdecode.cpp
${PROTO1_SRCS} ${PROTO1_HDRS}
${PROTO2_SRCS} ${PROTO2_HDRS})
target_link_libraries(demoinfogo ${PROTOBUF_LIBRARIES} json_spirit)