SerialOpr/CMakeLists.txt

20 lines
596 B
CMake
Raw Permalink Normal View History

2024-05-18 22:53:33 +08:00
cmake_minimum_required(VERSION 3.5)
project(SerialOprTest LANGUAGES CXX)
if (MSVC)
add_compile_options(/source-charset:utf-8)
endif()
if(NOT DEFINED LIBRARY_OUTPUT_PATH OR LIBRARY_OUTPUT_PATH STREQUAL "")
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
endif()
if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY OR CMAKE_RUNTIME_OUTPUT_DIRECTORY STREQUAL "")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
endif()
2024-05-18 22:53:33 +08:00
include_directories(libserial)
add_subdirectory(libserial)
add_executable(SerialOprTest main.cpp)
target_link_libraries(SerialOprTest PRIVATE SerialOpr)