summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/CMakeLists.txt
blob: 306a85aec6faf90b530b125ad187c4cb8a80dffb (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
find_path( LIBCONFIG_INCLUDE_DIRS "libconfig.h"
	PATHS "${CMAKE_CURRENT_SOURCE_DIR}"
	NO_DEFAULT_PATH )
find_path( LIBCONFIG_SOURCE_DIR "libconfig.c"
	PATHS "${CMAKE_CURRENT_SOURCE_DIR}"
	NO_DEFAULT_PATH )
mark_as_advanced( LIBCONFIG_INCLUDE_DIRS )
mark_as_advanced( LIBCONFIG_SOURCE_DIR )

set( LIBCONFIG_HEADERS
	"${CMAKE_CURRENT_SOURCE_DIR}/grammar.h"
	"${CMAKE_CURRENT_SOURCE_DIR}/libconfig.h"
	"${CMAKE_CURRENT_SOURCE_DIR}/parsectx.h"
	"${CMAKE_CURRENT_SOURCE_DIR}/scanctx.h"
	"${CMAKE_CURRENT_SOURCE_DIR}/scanner.h"
	"${CMAKE_CURRENT_SOURCE_DIR}/strbuf.h"
	"${CMAKE_CURRENT_SOURCE_DIR}/wincompat.h"
	CACHE INTERNAL "libconfig headers" )
set( LIBCONFIG_SOURCES
	"${CMAKE_CURRENT_SOURCE_DIR}/grammar.c"
	"${CMAKE_CURRENT_SOURCE_DIR}/libconfig.c"
	"${CMAKE_CURRENT_SOURCE_DIR}/scanctx.c"
	"${CMAKE_CURRENT_SOURCE_DIR}/scanner.c"
	"${CMAKE_CURRENT_SOURCE_DIR}/strbuf.c"
	CACHE INTERNAL "libconfig sources" )
set( LIBCONFIG_DEFINITIONS
	"-DLIBCONFIG_STATIC"
	CACHE INTERNAL "libconfig definitions" )