将 CGAL 合并到现有的 QT6 项目中

问题描述 投票:0回答:1

我有一个带有 .pro 文件的 QT6 项目,我想包含我在 StackOverflow 问题中看到的 CGAL 库,其中有人问了同样的问题,但在 Linux 中,我在 Windows 安装文件夹中找不到 libs 文件夹。

我从堆栈中找到的问题的链接是这样的:如何将 CGAL 包含到 QT Creator 中的 QT 项目中?

这是我的 .pro 文件,但正如你可以想象的,我没有 usr/include 文件夹,所以我不知道如何继续。

# TestCGAL.pro
CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    mainwindow.cpp

HEADERS += \
    mainwindow.h

INCLUDEPATH +=   C:/dev/CGAL-6.0/include\
LIBS        += -L/usr/include/
LIBS        += -lCGAL
LIBS        += -lgmp
LIBS        += -lmpfr // not really needed for me, but added since gmp had to be added too
QMAKE_CXXFLAGS += -frounding-math -O3

FORMS += \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

installation qmake cgal qt6
1个回答
0
投票

Qt 6 构建系统不再将

qmake
pro
文件一起使用 - 请参阅此页面。从这个页面:

Qt 5 构建系统构建在 qmake 之上。在 Qt 6 中,我们将构建系统移植到 CMake。

CGAL 库曾经使用

cmake
很长一段时间 - CGAL 发行版中有很多带有
CMakeLists.txt
配置文件的示例和演示。还有如何使用 Qt 6 和
cmake
的示例 - 例如 - 此页面

© www.soinside.com 2019 - 2024. All rights reserved.