-
Notifications
You must be signed in to change notification settings - Fork 85
/
CMakeLists.txt
50 lines (37 loc) · 1.32 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright (C) 2016, Canonical Ltd.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
cmake_minimum_required(VERSION 3.2.2)
project(react-native-desktop)
set(PROJECT_NAME "react-native-desktop")
set(PROJECT_VERSION "0.0.1")
option(JAVASCRIPTCORE_ENABLED
"Build with JavaScriptCore enabled"
OFF)
if(JAVASCRIPTCORE_ENABLED)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(WIN32)
set(REACT_BUILD_STATIC_LIB 1)
set(USE_QTWEBKIT 1)
endif()
include_directories(./React/Layout)
enable_testing()
message(STATUS "External modules dirs: ${EXTERNAL_MODULES_DIR}")
foreach(module_directory ${EXTERNAL_MODULES_DIR})
message(STATUS "Add external module subdirectory: ${module_directory}")
add_subdirectory(${module_directory})
endforeach(module_directory)
add_subdirectory(ReactQt)
add_subdirectory(Examples)
add_subdirectory(RNTester)
add_custom_target(
"watch"
COMMAND node -e \"require('fs').watch('${CMAKE_SOURCE_DIR}/ReactQt',function(e,f){require('child_process').spawn('make',{stdio:'inherit'})})\"
DEPENDS react-native
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)