-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (22 loc) · 1.12 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
project(MPC)
cmake_minimum_required (VERSION 3.5)
add_definitions(-std=c++11)
set(CXX_FLAGS "-W1")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(sources src/MPC.cpp src/main.cpp src/uWS/Extensions.cpp src/uWS/Group.cpp src/uWS/WebSocketImpl.cpp src/uWS/Networking.cpp src/uWS/Hub.cpp src/uWS/Node.cpp src/uWS/WebSocket.cpp src/uWS/HTTPSocket.cpp src/uWS/Socket.cpp src/uWS/uUV.cpp)
set_source_files_properties(${sources} PROPERTIES COMPILE_FLAGS "-D_USE_MATH_DEFINES")
else(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(sources src/MPC.cpp src/main.cpp)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
include_directories(/usr/local/include)
include_directories(/usr/local/opt/openssl/include)
link_directories(/usr/local/lib)
link_directories(/usr/local/opt/openssl/lib)
link_directories(/usr/local/Cellar/libuv/1.11.0/lib)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_executable(mpc ${sources})
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
target_link_libraries(mpc ipopt z ssl uv uWS)
endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")