CMakeLists.txt 446 Bytes
Newer Older
1 2
project (COMIO C)

Deucе's avatar
Deucе committed
3
cmake_minimum_required(VERSION 3.11)
4 5 6 7

set(SOURCE
	comio.c
)
Deucе's avatar
Deucе committed
8 9 10 11 12

set(HEADER
	comio.h
)

13 14 15 16 17 18
if(WIN32)
	list(APPEND SOURCE comio_win32.c)
else()
	list(APPEND SOURCE comio_nix.c)
endif()

Deucе's avatar
Deucе committed
19 20 21 22 23
add_library(comio OBJECT ${SOURCE})
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
	target_compile_definitions(comio PRIVATE SPEED_MACROS_ONLY)
endif()
target_include_directories(comio PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
24

Deucе's avatar
Deucе committed
25
target_link_libraries(comio xpdev)