jbus/CMakeLists.txt

25 lines
677 B
CMake
Raw Normal View History

2017-11-13 20:52:22 -08:00
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
2017-01-06 19:13:23 -08:00
project(jbus)
2020-04-10 22:00:51 -07:00
if (NOT MSVC)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
2017-06-17 19:51:58 -07:00
2017-01-07 00:24:16 -08:00
if(WIN32)
set(JBUS_PLAT_LIBS Ws2_32)
2017-01-07 15:31:23 -08:00
elseif(UNIX AND NOT APPLE)
set(JBUS_PLAT_LIBS pthread)
2017-01-07 00:24:16 -08:00
endif()
2017-01-06 19:13:23 -08:00
add_library(jbus
lib/Socket.cpp include/jbus/Socket.hpp
2017-01-06 21:00:40 -08: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 00:24:16 -08:00
target_link_libraries(jbus ${JBUS_PLAT_LIBS})
2019-06-11 19:03:39 -07:00
target_include_directories(jbus PUBLIC include)
2017-01-07 00:24:16 -08:00
2017-01-06 19:13:23 -08:00
add_executable(joyboot tools/joyboot.cpp)
target_link_libraries(joyboot jbus)