2019-10-30 06:28:13 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
project(porthole LANGUAGES C)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${PROJECT_SOURCE_DIR}/include
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(porthole STATIC
|
|
|
|
src/porthole.c
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
add_subdirectory(src/windows)
|
2019-11-04 10:09:13 +00:00
|
|
|
set(PLATFORM "windows")
|
2019-10-30 06:28:13 +00:00
|
|
|
else()
|
|
|
|
add_subdirectory(src/linux)
|
2019-11-04 10:09:13 +00:00
|
|
|
set(PLATFORM "linux")
|
2019-10-30 06:28:13 +00:00
|
|
|
endif()
|
|
|
|
|
2019-11-04 10:09:13 +00:00
|
|
|
target_link_libraries(porthole
|
|
|
|
PRIVATE
|
|
|
|
porthole-${PLATFORM}
|
|
|
|
lg_common
|
|
|
|
)
|
|
|
|
|
2019-10-30 06:28:13 +00:00
|
|
|
target_include_directories(porthole
|
|
|
|
INTERFACE
|
|
|
|
include
|
|
|
|
PRIVATE
|
|
|
|
src
|
|
|
|
)
|