aboutsummaryrefslogtreecommitdiff
path: root/src/common/CMakeLists.txt
blob: 92ef3d4c855f33b0ad40f2a4af49733dc0eaa488 (plain)
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
add_library(cru_base SHARED
	Base.cpp
	Exception.cpp
	Logger.cpp
	PropertyTree.cpp
	String.cpp
	StringUtil.cpp
	io/Stream.cpp
	io/MemoryStream.cpp
)
target_compile_definitions(cru_base PRIVATE CRU_BASE_EXPORT_API)
target_include_directories(cru_base PUBLIC ${CRU_INCLUDE_DIR})
target_compile_definitions(cru_base PUBLIC $<$<CONFIG:Debug>:CRU_DEBUG>)

if (UNIX)
	target_sources(cru_base PRIVATE
		ErrnoException.cpp
		io/UnixFileStream.cpp
	)
endif()

if (WIN32)
	target_compile_definitions(cru_base PUBLIC CRU_PLATFORM_WINDOWS)
elseif(APPLE)
	target_compile_definitions(cru_base PUBLIC CRU_PLATFORM_OSX)
else()
	target_compile_definitions(cru_base PUBLIC CRU_PLATFORM_LINUX)
endif()

find_package(Microsoft.GSL CONFIG REQUIRED)
target_link_libraries(cru_base PUBLIC Microsoft.GSL::GSL)