-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (32 loc) · 1.15 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
cmake_minimum_required(VERSION 3.10)
project(rcnf VERSION 1.0)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED True)
include_directories(include)
add_library(rcnf_lib STATIC c_rcnf/ext.c
c_rcnf/env.c
c_rcnf/lang/lplang.c
c_rcnf/lang/structs/lang_structs.c
c_rcnf/shared/c_rcnf.c
c_rcnf/rcnf.c)
target_include_directories(rcnf_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(rcnf_exec c_rcnf/ext.c
c_rcnf/env.c
c_rcnf/shared/c_rcnf.c
c_rcnf/lang/lplang.c
c_rcnf/lang/structs/lang_structs.c
test.c
c_rcnf/rcnf.c)
set_target_properties(rcnf_exec PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/shared")
set(SOURCES c_rcnf/ext.c
c_rcnf/env.c
c_rcnf/shared/c_rcnf.c
c_rcnf/lang/lplang.c
c_rcnf/lang/structs/lang_structs.c
c_rcnf/rcnf.c)
add_library(rcnf_shared SHARED ${SOURCES})
set_target_properties(rcnf_shared PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/shared/dll
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/shared/dll
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/shared/dll)