加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
liuleidong 提交于 2023-11-01 10:11 . 整理代码
cmake_minimum_required(VERSION 3.14)
project(qgis_cpp_api_apps VERSION "1.0.0.0")
project(qgis_cpp_api_apps LANGUAGES CXX)
include_directories(${PROJECT_SOURCE_DIR}/inc) # 指定头文件搜索路径
if(WIN32)
MESSAGE(STATUS "Now is windows")
# add_compile_options(/W4)
add_compile_options(/wd4819)
add_definitions(-D_USE_MATH_DEFINES)
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/windows/qgis-ltr-dev/include)
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/windows/gdal/include)
link_directories(${PROJECT_SOURCE_DIR}/thirdparty/windows/qgis-ltr-dev/lib/) # 指定库搜索路径
ELSEIF(UNIX)
MESSAGE(STATUS "Now is UNIX-like OS's.")
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/linux/gdal/include)
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/linux/qgis/include/qgis)
link_directories(${PROJECT_SOURCE_DIR}/thirdparty/linux/qgis/lib/) # 指定库搜索路径
ENDIF()
link_directories(${PROJECT_SOURCE_DIR}/bin) # 指定库搜索路径
# 指定 编译子目录
add_subdirectory(./src/ll_qgis_base_lib)
add_subdirectory(./src/ll_qgis_hello)
add_subdirectory(./src/ll_qgis_code_examples)
add_subdirectory(./src/ll_qgis_uav_realtime)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化