1 Star 0 Fork 0

hanhai-modules/tool-entry

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
junjian 提交于 2024-04-26 13:50 . feat: first version #82894
cmake_minimum_required(VERSION 3.10)
include(GNUInstallDirs)
project(lt)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
aux_source_directory(. DIRSRCS)
set(INSTALL_CONF_PATH /etc/hanhai/conf/tools_entry)
if(CMAKE_EXTRA_SYSTEM MATCHES QNX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb -g -no-pie -stdlib=libstdc++ -D_GLIBCXX_USE_C99 -std=c++11 -fPIC")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES QNX OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
list(APPEND CMAKE_MODULE_PATH "$ENV{SDKTARGETSYSROOT}/usr/share/cmake/Modules")
find_package(fidl REQUIRED MODULE)
idlGeneratorAndInstall("YES" "lib" "" "${CMAKE_CURRENT_SOURCE_DIR}/tools-entry_idl/tools-entry.fidl" "${CMAKE_INSTALL_INCLUDEDIR}/hanhai" "")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
endif()
file(GLOB SRCS src/*.cc)
add_executable(lt ${SRCS})
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/conf/tools_entry_conf.json
${CMAKE_CURRENT_BINARY_DIR}/tools_entry_conf.json)
#target_link_libraries(lt boost)
install(TARGETS lt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/conf/tools_entry_conf.json" DESTINATION /etc/hanhai/conf/tools_entry)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hanhai-modules/tool-entry.git
git@gitee.com:hanhai-modules/tool-entry.git
hanhai-modules
tool-entry
tool-entry
master

搜索帮助