summaryrefslogtreecommitdiffstats
path: root/contrib/patches/picoc/CMakeLists.txt
blob: 76fe18474bebb308206654c0898e7e3600710746 (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
cmake_minimum_required(VERSION 2.8.4)
project(picoc)

# include_directories(${PROJECT_SOURCE_DIR}/include)

file(GLOB PICOC_FILES 
	${PROJECT_SOURCE_DIR}/*.h
	${PROJECT_SOURCE_DIR}/*.c
	${PROJECT_SOURCE_DIR}/cstdlib/*.h
	${PROJECT_SOURCE_DIR}/cstdlib/*.c)

	if (UNIX)
		add_definitions("-DUNIX_HOST")
		list (APPEND PICOC_FILES ${PROJECT_SOURCE_DIR}/platform/library_unix.c)
		list (APPEND PICOC_FILES ${PROJECT_SOURCE_DIR}/platform/platform_unix.c)
	endif()
	if (WIN32)
		list (REMOVE_ITEM PICOC_FILES ${PROJECT_SOURCE_DIR}/cstdlib/unistd.c)
		list (APPEND PICOC_FILES ${PROJECT_SOURCE_DIR}/platform/platform_msvc.c)
		list (APPEND PICOC_FILES ${PROJECT_SOURCE_DIR}/platform/library_msvc.c)
	endif()

add_library(picoc ${PICOC_FILES})

# set_target_properties(uriparser PROPERTIES PREFIX "")