-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
59 lines (54 loc) · 1.63 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
51
52
53
54
55
56
57
58
59
project(lyrio-judge)
cmake_minimum_required(VERSION 3.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -std=c++17")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
include_directories(${CMAKE_JS_INC})
# Builtin Checkers
add_library(
builtin_checkers
SHARED
${CMAKE_JS_SRC}
"native/builtin_checkers/builtin_checkers.cc"
"native/builtin_checkers/integers.h"
"native/builtin_checkers/floats.h"
"native/builtin_checkers/lines.h"
"native/builtin_checkers/binary.h"
)
set_target_properties(builtin_checkers PROPERTIES PREFIX "" SUFFIX ".node")
target_include_directories(builtin_checkers PRIVATE
${CMAKE_SOURCE_DIR}/node_modules/node-addon-api
${CMAKE_SOURCE_DIR}/node_modules/node-addon-api/src
${CMAKE_JS_INC}
"vendor/testlib"
)
target_link_libraries(builtin_checkers PRIVATE ${CMAKE_JS_LIB})
# POSIX
add_library(
posix
SHARED
${CMAKE_JS_SRC}
"native/posix/posix.cc"
)
set_target_properties(posix PROPERTIES PREFIX "" SUFFIX ".node")
target_include_directories(posix PRIVATE
${CMAKE_SOURCE_DIR}/node_modules/node-addon-api
${CMAKE_SOURCE_DIR}/node_modules/node-addon-api/src
${CMAKE_JS_INC}
)
target_link_libraries(posix PRIVATE ${CMAKE_JS_LIB})
# fs_native
add_library(
fs_native
SHARED
${CMAKE_JS_SRC}
"native/fs_native/fs_native.cc"
)
set_target_properties(fs_native PROPERTIES PREFIX "" SUFFIX ".node")
target_include_directories(fs_native PRIVATE
${CMAKE_SOURCE_DIR}/node_modules/node-addon-api
${CMAKE_SOURCE_DIR}/node_modules/node-addon-api/src
${CMAKE_JS_INC}
)
target_link_libraries(fs_native PRIVATE ${CMAKE_JS_LIB} stdc++fs)