forked from jeremyong/Selene
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (21 loc) · 784 Bytes
/
CMakeLists.txt
File metadata and controls
27 lines (21 loc) · 784 Bytes
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
cmake_minimum_required(VERSION 2.8)
project(Selene)
set(LUA_INCLUDE_DIR "" CACHE FILEPATH "Path to lua headers")
if(${LUA_INCLUDE_DIR})
if(NOT EXISTS ${LUA_INCLUDE_DIR}/lua.h)
message(SEND_ERROR "Can't find lua.h in ${LUA_INCLUDE_DIR}")
endif()
endif()
include_directories(${LUA_INCLUDE_DIR})
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11 -stdlib=libc++")
elseif(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11")
elseif(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11")
endif(APPLE)
include_directories(include)
file(GLOB headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
include/*.h include/selene/*.h)
add_executable(test_runner ${CMAKE_CURRENT_SOURCE_DIR}/test/Test.cpp ${headers})
target_link_libraries(test_runner lua)