?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. set(LUABRIDGE_HEADERS
  2.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/List.h
  3.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/LuaBridge.h
  4.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/Map.h
  5.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/RefCountedObject.h
  6.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/RefCountedPtr.h
  7.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/UnorderedMap.h
  8.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/Vector.h
  9.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/Array.h
  10. )
  11.  
  12. source_group("LuaBridge" FILES ${LUABRIDGE_HEADERS})
  13.  
  14. set(LUABRIDGE_DETAIL_HEADERS
  15.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/CFunctions.h
  16.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/ClassInfo.h
  17.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/Config.h
  18.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/Constructor.h
  19.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/dump.h
  20.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/FuncTraits.h
  21.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/Iterator.h
  22.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/LuaException.h
  23.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/LuaHelpers.h
  24.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/LuaRef.h
  25.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/Namespace.h
  26.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/Stack.h
  27.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/TypeList.h
  28.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/TypeTraits.h
  29.     ${CMAKE_CURRENT_SOURCE_DIR}/LuaBridge/detail/Userdata.h
  30. )
  31.  
  32. source_group("LuaBridge\\detail" FILES ${LUABRIDGE_DETAIL_HEADERS})
  33.  
  34. add_library(LuaBridge INTERFACE)
  35.  
  36. target_sources(LuaBridge INTERFACE
  37.     ${LUABRIDGE_HEADERS}
  38.     ${LUABRIDGE_DETAIL_HEADERS}
  39. )
  40.  
  41. target_include_directories(LuaBridge INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
  42.  
  43. if(LUABRIDGE_CXX17)
  44.     target_compile_definitions(LuaBridge INTERFACE LUABRIDGE_CXX17)
  45. endif()
  46.  
  47. if(MSVC AND CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
  48.     add_custom_target(LuaBridgeSources SOURCES
  49.         ${LUABRIDGE_HEADERS}
  50.         ${LUABRIDGE_DETAIL_HEADERS}
  51.     )
  52. endif()
  53.