aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.ucl/CMakeLists.txt
blob: 0ee024cb4972daa464219e6d66ff693a2328bcc2 (plain) (blame)
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
# This source code is released into the public domain.

pkg_check_modules(LIBUCL REQUIRED libucl)

add_library(nihil.ucl STATIC)
target_link_libraries(nihil.ucl PUBLIC nihil)

target_sources(nihil.ucl
	PUBLIC FILE_SET modules TYPE CXX_MODULES FILES
	nihil.ucl.ccm
	emit.ccm
	error.ccm
	object.ccm
	object_cast.ccm
	parser.ccm
	type.ccm

	array.ccm
	boolean.ccm
	integer.ccm
	map.ccm
	real.ccm
	string.ccm

	PRIVATE
	emit.cc
	error.cc
	parser.cc
	type.cc

	object.cc
	boolean.cc
	integer.cc
	real.cc
	string.cc
)

target_compile_options(nihil.ucl PUBLIC ${LIBUCL_CFLAGS_OTHER})
target_include_directories(nihil.ucl PUBLIC ${LIBUCL_INCLUDE_DIRS})
target_link_libraries(nihil.ucl PUBLIC ${LIBUCL_LIBRARIES})
target_link_directories(nihil.ucl PUBLIC ${LIBUCL_LIBRARY_DIRS})

if(NIHIL_TESTS)
	add_subdirectory(tests)
	enable_testing()
endif()