File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 11add_subdirectory (luajit)
2- add_subdirectory (luabind)
2+ include (luabind.cmake)
3+ #add_subdirectory(luabind)
34add_subdirectory (lzo)
45add_subdirectory (cximage)
56add_subdirectory (NVTT)
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 2.8)
2+ project (luabind)
3+
4+ option (LUABIND_BUILD_TESTING "Build luabind testing" OFF )
5+ option (LUABIND_BUILD_SHARED "Build luabind as a shared library?" ON )
6+
7+ set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH} " "${CMAKE_SOURCE_DIR} /cmake" )
8+
9+ if (BUILD_DEPENDS)
10+ add_subdirectory (luajit ${CMAKE_BINARY_DIR} /Externals/luajit)
11+ else ()
12+ link_directories (${CMAKE_BINARY_DIR} /Externals/luajit)
13+ endif ()
14+ #if(BUILD_DEPENDS)
15+ # add_subdirectory(platform/cmake/LuaJIT ${CMAKE_BINARY_DIR}/LuaJIT)
16+ #else()
17+ # link_directories(dependencies/LuaJIT/build/)
18+ #endif()
19+
20+ if (MSVC )
21+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP" )
22+ endif ()
23+
24+ if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
25+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fpermissive" )
26+ endif ()
27+
28+ if (LUABIND_BUILD_SHARED)
29+ add_definitions (-DLUABIND_DYNAMIC_LINK)
30+ endif ()
31+
32+ add_definitions (-DNDEBUG) #TODO: Add toggle for debug mode
33+
34+ include_directories (${CMAKE_CURRENT_SOURCE_DIR}
35+ ${LUA_INCLUDE_DIR}
36+ luabind
37+ )
38+
39+ add_subdirectory (luabind/src)
40+
41+ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR )
42+ if (LUABIND_BUILD_TESTING)
43+ add_subdirectory (luabind/test )
44+ endif ()
45+ add_subdirectory (luabind/doc )
46+ endif ()
You can’t perform that action at this time.
0 commit comments