luajit-2.0 and sol-2 support added
This commit is contained in:
parent
a45e758776
commit
96b5ad1b56
@ -7,9 +7,9 @@
|
|||||||
# If you want to specify a supplementary folder for include, use :
|
# If you want to specify a supplementary folder for include, use :
|
||||||
# EXTRA_INCLUDES
|
# EXTRA_INCLUDES
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
cmake_policy(VERSION 2.8)
|
cmake_policy(VERSION 3.1)
|
||||||
cmake_policy(SET CMP0020 NEW)
|
#cmake_policy(SET CMP0020 NEW)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
@ -81,7 +81,7 @@ else()
|
|||||||
message(WARNING "NO SOURCE FILE PROVIDED")
|
message(WARNING "NO SOURCE FILE PROVIDED")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-std=c++11)
|
add_definitions(-std=c++14)
|
||||||
add_definitions(-Wreorder)
|
add_definitions(-Wreorder)
|
||||||
add_definitions(-Wparentheses)
|
add_definitions(-Wparentheses)
|
||||||
add_definitions(-Wsign-compare)
|
add_definitions(-Wsign-compare)
|
||||||
@ -97,6 +97,29 @@ set(INCLUDE_PATHS ${INCLUDE_ROOT})
|
|||||||
# LIST(APPEND INCLUDE_PATHS ${INCLUDE_ROOT}${EXTENSION} " ")
|
# LIST(APPEND INCLUDE_PATHS ${INCLUDE_ROOT}${EXTENSION} " ")
|
||||||
# endforeach()
|
# endforeach()
|
||||||
|
|
||||||
|
|
||||||
|
if(USE_SOL2)
|
||||||
|
set(USE_LUA True)
|
||||||
|
LIST(APPEND INCLUDE_PATHS ${INCLUDE_ROOT}/sol2)
|
||||||
|
MESSAGE(STATUS "using sol2 headers")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(USE_LUA)
|
||||||
|
find_library(LUA_LIBRARY
|
||||||
|
NAMES luajit-5.1
|
||||||
|
PATHS ${LIB_PATHS}
|
||||||
|
)
|
||||||
|
|
||||||
|
MESSAGE(STATUS "using lua lib")
|
||||||
|
|
||||||
|
add_definitions(-llua)
|
||||||
|
|
||||||
|
LIST(APPEND INCLUDE_PATHS ${INCLUDE_ROOT}/luajit-2.0)
|
||||||
|
LIST(APPEND LIB_DEPENDENCIES_LIST ${LUA_LIBRARY})
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(USE_ENGINE)
|
if(USE_ENGINE)
|
||||||
find_library(SPARROW_ENGINE_LIBRARY
|
find_library(SPARROW_ENGINE_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
@ -382,16 +405,11 @@ if(LIB_SRC_LIST)
|
|||||||
${LIBRARY_NAME}
|
${LIBRARY_NAME}
|
||||||
${LIB_DEPENDENCIES_LIST}
|
${LIB_DEPENDENCIES_LIST}
|
||||||
)
|
)
|
||||||
if(EXEC_SRC_LIST)
|
endif()
|
||||||
target_link_libraries(
|
if(EXEC_SRC_LIST)
|
||||||
${EXECUTABLE_NAME}
|
|
||||||
${LIBRARY_NAME}
|
|
||||||
${LIB_DEPENDENCIES_LIST}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
elseif(EXEC_SRC_LIST)
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${EXECUTABLE_NAME}
|
${EXECUTABLE_NAME}
|
||||||
${LIB_DEPENDENCIES_LIST}
|
${LIB_DEPENDENCIES_LIST}
|
||||||
|
${LIBRARY_NAME}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user