代码拉取完成,页面将自动刷新
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)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。