20 lines
596 B
CMake
20 lines
596 B
CMake
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()
|
|
|
|
include_directories(libserial)
|
|
add_subdirectory(libserial)
|
|
add_executable(SerialOprTest main.cpp)
|
|
target_link_libraries(SerialOprTest PRIVATE SerialOpr) |