-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (33 loc) · 926 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
33
34
35
36
37
38
39
40
cmake_minimum_required (VERSION 2.8)
project (openpad)
option(BUILD_EXAMPLE "Build an example server" OFF)
include_directories(
${CMAKE_SOURCE_DIR}/PracticalSocket
${CMAKE_SOURCE_DIR}/json
${CMAKE_SOURCE_DIR}/openpad
)
SET( HEADERS
PracticalSocket/PracticalSocket.h
openpad/openpad.h
openpad/Request.h
openpad/Server.h
openpad/ServerHandler.h
openpad/Util.h
json/json.h
Example/DebugGame.h
)
set( SOURCES
PracticalSocket/PracticalSocket.cpp
openpad/Request.cpp
openpad/Server.cpp
openpad/ServerHandler.cpp
openpad/Util.cpp
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")
add_library(openpad_static ${HEADERS} ${SOURCES} )
add_library(openpad_shared SHARED ${HEADERS} ${SOURCES} )
target_link_libraries(openpad_static ${CMAKE_SOURCE_DIR}/libjsoncpp.a )
target_link_libraries(openpad_shared ${CMAKE_SOURCE_DIR}/libjsoncpp.a )
if(BUILD_EXAMPLE)
add_subdirectory(Example)
ENDIF(BUILD_EXAMPLE)