2016-10-30 07:07:38 +05:30
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
project(LocalPeer)
|
|
|
|
|
2021-11-28 23:31:21 +05:30
|
|
|
find_package(Qt5 COMPONENTS Core Network REQUIRED)
|
2016-10-30 07:07:38 +05:30
|
|
|
|
|
|
|
set(SINGLE_SOURCES
|
|
|
|
src/LocalPeer.cpp
|
|
|
|
src/LockedFile.cpp
|
|
|
|
src/LockedFile.h
|
|
|
|
include/LocalPeer.h
|
|
|
|
)
|
|
|
|
|
|
|
|
if(UNIX)
|
2018-07-15 18:21:05 +05:30
|
|
|
list(APPEND SINGLE_SOURCES
|
|
|
|
src/LockedFile_unix.cpp
|
|
|
|
)
|
2016-10-30 07:07:38 +05:30
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
2018-07-15 18:21:05 +05:30
|
|
|
list(APPEND SINGLE_SOURCES
|
|
|
|
src/LockedFile_win.cpp
|
|
|
|
)
|
2016-10-30 07:07:38 +05:30
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(LocalPeer STATIC ${SINGLE_SOURCES})
|
|
|
|
target_include_directories(LocalPeer PUBLIC include)
|
|
|
|
|
2018-06-01 19:50:33 +05:30
|
|
|
target_link_libraries(LocalPeer Qt5::Core Qt5::Network)
|