-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
30 lines (21 loc) · 1006 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
cmake_minimum_required(VERSION 3.5)
project(open-pic LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
file(GLOB TARGET_SRC "${CMAKE_SOURCE_DIR}/src/*.cpp")
add_executable(${PROJECT_NAME} ${TARGET_SRC})
target_compile_options(${PROJECT_NAME} PRIVATE -O3 -w -ffast-math)
target_include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_SOURCE_DIR}/3rdparty/boost_1_52_0
${CMAKE_SOURCE_DIR}/3rdparty/lua-5.1/src
${CMAKE_SOURCE_DIR}/3rdparty/lua-5.1/etc
${CMAKE_SOURCE_DIR}/3rdparty/luabind-0.8.1/lib/include)
find_package(OpenMP)
if(OpenMP_CXX_FOUND)
target_link_libraries(${PROJECT_NAME} PRIVATE OpenMP::OpenMP_CXX)
endif()
target_link_directories(${PROJECT_NAME} PRIVATE
${CMAKE_SOURCE_DIR}/3rdparty/luabind-0.8.1/stage
/usr/lib)
target_link_libraries(${PROJECT_NAME} PRIVATE
lua5.1 luabind)