eis/mix_cc/shm/CMakeLists.txt

23 lines
791 B
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cmake_minimum_required(VERSION 3.10)
project(mix_cc_shm VERSION 0.1)
# include public cmake file 包含公共的cmake配置文件
include(../../cmake_include/public.cmake)
aux_source_directory(. DIR_ROOT)
# compile linux dependent lib 设置编译linux独立的lib文件并打开所有警告信息
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX -fPIC -Wall")
# add library 添加库文件目标
add_library(mix_cc_shm STATIC ${DIR_ROOT})
# set link options 设置连接选项
target_link_libraries(mix_cc_shm nlohmann_json::nlohmann_json )
# set include options 设置头文件选项
target_include_directories(mix_cc_shm PUBLIC ${my_lib_include})
set_target_properties(mix_cc_shm PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${my_lib})