This commit is contained in:
JOLIMAITRE Matthieu 2024-05-29 15:18:03 +02:00
commit 8d45088064
20 changed files with 974 additions and 0 deletions

35
CMakeLists.txt Normal file
View file

@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.15)
project(robotCommand)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
#set(CMAKE_VERBOSE_MAKEFILE ON)
set(gcc_like_cxx "$<COMPILE_LANG_AND_ID:CXX,ARMClang,AppleClang,Clang,GNU,LCC>")
set(msvc_cxx "$<COMPILE_LANG_AND_ID:CXX,MSVC>")
add_executable(robotCommand
src/main.cpp
src/robot.cpp
src/jsonrpctcpclient.cpp
src/PosTracker.cpp
src/PosHistory.cpp
)
find_package(jsoncpp REQUIRED)
find_package(SFML COMPONENTS graphics window system REQUIRED)
target_link_libraries(robotCommand jsoncpp_lib sfml-graphics sfml-window sfml-system)
if (WIN32)
target_link_libraries(robotCommand ws2_32)
endif ()
target_compile_options(robotCommand PRIVATE
"$<${gcc_like_cxx}:-Wall;-Wextra;-Wshadow;-Wformat=2;-Wunused>"
"$<${msvc_cxx}:-W3>"
)
#add_compile_definitions(JSONRPC_DEBUG)
if (WIN32)
add_compile_definitions(_WIN32_WINNT=0x0501)
endif ()