summaryrefslogtreecommitdiffstats
path: root/src/luabind-1-cmakelists.patch
blob: 5f36ca9e31e443be9f2d7faf15cd408a5b3c4e97 (plain)
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
41
This file is part of MXE. See LICENSE.md for licensing information.

commit 9b4639e25442a3b6d0337d8e602a8332ec0e26e0
Author: Boris Nagaev <bnagaev@gmail.com>
Date:   Fri Aug 22 15:17:21 2014 +0400

    CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..acc47ae
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.6)
+project(luabind)
+
+include(FindBoost)
+FIND_PACKAGE(Boost 1.34 REQUIRED)
+include_directories(${Boost_INCLUDE_DIRS})
+
+include(FindLua51)
+find_package(Lua51 REQUIRED)
+include_directories(${LUA_INCLUDE_DIR})
+
+include_directories(${PROJECT_SOURCE_DIR})
+
+file(GLOB sources "src/*.cpp")
+
+add_library(luabind STATIC ${sources})
+
+set(luabind_cxx_flags "-ftemplate-depth-128 -finline-functions")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${luabind_cxx_flags}")
+
+target_link_libraries(luabind ${LUA_LIBRARIES} luabind)
+
+install(TARGETS luabind DESTINATION
+        ${CMAKE_INSTALL_PREFIX}/lib)
+install(DIRECTORY luabind DESTINATION
+        ${CMAKE_INSTALL_PREFIX}/include)
+