2017-11-14 04:52:22 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
|
2017-01-07 03:13:23 +00:00
|
|
|
project(jbus)
|
|
|
|
|
2020-04-11 05:00:51 +00:00
|
|
|
if (NOT MSVC)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
endif()
|
2017-06-18 02:51:58 +00:00
|
|
|
|
2017-01-07 08:24:16 +00:00
|
|
|
if(WIN32)
|
|
|
|
set(JBUS_PLAT_LIBS Ws2_32)
|
2017-01-07 23:31:23 +00:00
|
|
|
elseif(UNIX AND NOT APPLE)
|
|
|
|
set(JBUS_PLAT_LIBS pthread)
|
2017-01-07 08:24:16 +00:00
|
|
|
endif()
|
|
|
|
|
2017-01-07 03:13:23 +00:00
|
|
|
add_library(jbus
|
2017-12-30 01:07:48 +00:00
|
|
|
lib/Socket.cpp include/jbus/Socket.hpp
|
2017-01-07 05:00:40 +00:00
|
|
|
lib/Common.cpp include/jbus/Common.hpp
|
|
|
|
lib/Endpoint.cpp include/jbus/Endpoint.hpp
|
|
|
|
lib/Listener.cpp include/jbus/Listener.hpp)
|
2017-01-07 08:24:16 +00:00
|
|
|
target_link_libraries(jbus ${JBUS_PLAT_LIBS})
|
2019-06-12 02:03:39 +00:00
|
|
|
target_include_directories(jbus PUBLIC include)
|
2017-01-07 08:24:16 +00:00
|
|
|
|
2017-01-07 03:13:23 +00:00
|
|
|
add_executable(joyboot tools/joyboot.cpp)
|
|
|
|
target_link_libraries(joyboot jbus)
|