Subversion Repositories NedoOS

Rev

Details | Last modification | View Log

Rev Author Line No. Line
1537 lvd 1
cmake_minimum_required(VERSION 3.5)
2
 
3
project(LuaBridge)
4
 
5
include(CMakeDependentOption)
6
 
7
option(LUABRIDGE_CXX17 "Use C++17 standard if supported by compiler" OFF)
8
 
9
if(LUABRIDGE_CXX17)
10
    set(CMAKE_CXX_STANDARD 17)
11
else()
12
    set(CMAKE_CXX_STANDARD 11)
13
endif()
14
 
15
set(CMAKE_CXX_STANDARD_REQUIRED ON)
16
set(CMAKE_CXX_EXTENSIONS OFF)
17
 
18
cmake_dependent_option(LUABRIDGE_TESTING "Build tests" ON
19
    "CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF
20
)
21
 
22
if(WIN32)
23
    add_compile_options(/MP)
24
endif()
25
 
26
add_subdirectory(Source)
27
 
28
if(LUABRIDGE_TESTING)
29
    set(gtest_force_shared_crt ON CACHE BOOL "Use /MD and /MDd" FORCE)
30
    add_subdirectory(third_party/gtest)
31
 
32
    enable_testing()
33
    add_subdirectory(Tests)
34
endif()
35
 
36
add_custom_target(Documentation SOURCES
37
    .github/workflows/cmake.yml
38
    CHANGES.md
39
    README.md
40
    Doxyfile
41
    index.html
42
    Manual.html
43
)