This repository was archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
69 lines (53 loc) · 2.21 KB
/
CMakeLists.txt
File metadata and controls
69 lines (53 loc) · 2.21 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright (C) 2007-2012 LuaDist.
# Modified by Peter Kapec
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the COPYRIGHT file distributed with LuaDist.
# Please note that the package source code is licensed under its own license.
# Original build script by Leandro Motta Barros.
project ( luabind NONE )
cmake_minimum_required ( VERSION 2.8 )
include ( cmake/dist.cmake )
include ( lua )
# Find Boost
set ( Boost_USE_STATIC_LIBS OFF )
#~ FIND_PACKAGE(Boost 1.38 COMPONENTS unit_test_framework REQUIRED)
find_package ( Boost 1.38 REQUIRED )
# Include directories
include_directories ( ${Boost_INCLUDE_DIRS} ${LUA_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
# Link directories
#~ LINK_DIRECTORIES(${BOOST_LIBRARY_DIRS})
# Build the library
file ( GLOB LUABIND_SRC "src/*.cpp" )
add_definitions ( -DLUABIND_BUILDING )
add_library ( luabind ${LUABIND_SRC} )
target_link_libraries ( luabind ${LUA_LIBRARIES} )
#~ 2TODO: Tests
# Add CTest support
#~ ENABLE_TESTING()
# Unit tests
#~ FUNCTION(AddUnitTest name)
#~ ADD_EXECUTABLE(${name} Tests/${name}.cpp)
#~ TARGET_LINK_LIBRARIES(${name} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${LUA_LIBRARIES} diluculum)
#~ ADD_TEST(${name} ${name})
#~ ENDFUNCTION(AddUnitTest)
#~ ADD_LIBRARY(ATestModule Tests/ATestModule.cpp)
#~ TARGET_LINK_LIBRARIES(ATestModule diluculum ${LUA_LIBRARIES})
#~ SET_TARGET_PROPERTIES(ATestModule PROPERTIES PREFIX "")
#~ AddUnitTest(TestLuaFunction)
# Build examples
#~ FUNCTION(AppExample name sources includes)
#~ INCLUDE_DIRECTORIES(${includes})
#~ ADD_EXECUTABLE(${name} ${sources})
#~ TARGET_LINK_LIBRARIES(${name} luabind)
#~ ENDFUNCTION(AppExample)
#~ AppExample(any_converter "examples/any_converter/any_converter.cpp" "" )
#~ AppExample(filesystem "examples/filesystem/filesystem.cpp" "examples/filesystem" )
#~ AppExample(glut "examples/glut/glut_bind.cpp" "" )
#~ AppExample(hello_world "examples/hello_world/hello_world.cpp" "" )
#~ AppExample(intrusive_ptr "examples/intrusive_ptr/intrusive_ptr.cpp" "" )
#~ AppExample(regexp "examples/regexp/regex_wrap.cpp" "" )
# Install
install_library ( luabind )
install_header ( luabind )
install_data ( LICENSE INSTALL )
install_doc ( doc/ )