forked from OpenXRay/xray-16
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use luabind.cmake instead of luabind/CMakeLists.txt. luabind now depe…
…nds on Externals/luajit
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(luabind) | ||
|
||
option(LUABIND_BUILD_TESTING "Build luabind testing" OFF) | ||
option(LUABIND_BUILD_SHARED "Build luabind as a shared library?" ON) | ||
|
||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake") | ||
|
||
if(BUILD_DEPENDS) | ||
add_subdirectory(luajit ${CMAKE_BINARY_DIR}/Externals/luajit) | ||
else() | ||
link_directories(${CMAKE_BINARY_DIR}/Externals/luajit) | ||
endif() | ||
#if(BUILD_DEPENDS) | ||
# add_subdirectory(platform/cmake/LuaJIT ${CMAKE_BINARY_DIR}/LuaJIT) | ||
#else() | ||
# link_directories(dependencies/LuaJIT/build/) | ||
#endif() | ||
|
||
if(MSVC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") | ||
endif() | ||
|
||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fpermissive") | ||
endif() | ||
|
||
if(LUABIND_BUILD_SHARED) | ||
add_definitions(-DLUABIND_DYNAMIC_LINK) | ||
endif() | ||
|
||
add_definitions(-DNDEBUG) #TODO: Add toggle for debug mode | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} | ||
${LUA_INCLUDE_DIR} | ||
luabind | ||
) | ||
|
||
add_subdirectory(luabind/src) | ||
|
||
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) | ||
if(LUABIND_BUILD_TESTING) | ||
add_subdirectory(luabind/test) | ||
endif() | ||
add_subdirectory(luabind/doc) | ||
endif() |