aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-05-09 14:54:01 +0000
committerSaturneric <[email protected]>2022-05-09 14:54:01 +0000
commit058f39a1a5050c927dbd4434c7bafeead36b68ea (patch)
treec1f77772b244708cdbbe522902c586a599612088
parentfix: fix crash poblem when doing operations (diff)
downloadGpgFrontend-058f39a1a5050c927dbd4434c7bafeead36b68ea.tar.gz
GpgFrontend-058f39a1a5050c927dbd4434c7bafeead36b68ea.zip
fix: fix build issues on linux platform
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/core/common/CoreCommonUtil.cpp80
-rw-r--r--src/core/common/CoreCommonUtil.h126
3 files changed, 109 insertions, 105 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 07e625b0..5d61564d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -259,7 +259,7 @@ endif ()
# link options for GpgFrontend
if (APPLICATION_BUILD)
target_link_libraries(${AppName} gpgfrontend_ui)
- IF (MINGW)
+ if (MINGW)
message(STATUS "Link Application Library For MINGW")
target_link_libraries(${AppName} crypto)
elseif (APPLE)
@@ -268,7 +268,11 @@ if (APPLICATION_BUILD)
else ()
message(STATUS "Link Application Library For Linux")
target_link_libraries(${AppName} crypto pthread)
- endif ()
+ # issue on filesystem support of gcc
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 9.0)
+ target_link_libraries(${AppName} stdc++fs)
+ endif ()
+ endif()
endif ()
# using c++ standard 17
diff --git a/src/core/common/CoreCommonUtil.cpp b/src/core/common/CoreCommonUtil.cpp
index 69d26f72..3b2b4007 100644
--- a/src/core/common/CoreCommonUtil.cpp
+++ b/src/core/common/CoreCommonUtil.cpp
@@ -1,40 +1,40 @@
-/**
- * Copyright (C) 2021 Saturneric
- *
- * This file is part of GpgFrontend.
- *
- * GpgFrontend is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GpgFrontend is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>.
- *
- * The initial version of the source code is inherited from
- * the gpg4usb project, which is under GPL-3.0-or-later.
- *
- * The source code version of this software was modified and released
- * by Saturneric<[email protected]><[email protected]> starting on May 12, 2021.
- *
- */
-
-#include "CoreCommonUtil.h"
-
-namespace GpgFrontend {
-
-std::unique_ptr<CoreCommonUtil> CoreCommonUtil::instance_ = nullptr; ///<
-
-CoreCommonUtil *CoreCommonUtil::GetInstance() {
- LOG(INFO) << "called";
- if (instance_ == nullptr) {
- instance_ = std::make_unique<CoreCommonUtil>();
- }
- return instance_.get();
-}
-} // namespace GpgFrontend
+/**
+ * Copyright (C) 2021 Saturneric
+ *
+ * This file is part of GpgFrontend.
+ *
+ * GpgFrontend is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GpgFrontend is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * The initial version of the source code is inherited from
+ * the gpg4usb project, which is under GPL-3.0-or-later.
+ *
+ * The source code version of this software was modified and released
+ * by Saturneric<[email protected]><[email protected]> starting on May 12, 2021.
+ *
+ */
+
+#include "CoreCommonUtil.h"
+
+namespace GpgFrontend {
+
+std::unique_ptr<CoreCommonUtil> CoreCommonUtil::instance_ = nullptr; ///<
+
+CoreCommonUtil *CoreCommonUtil::GetInstance() {
+ LOG(INFO) << "called";
+ if (instance_ == nullptr) {
+ instance_ = std::make_unique<CoreCommonUtil>();
+ }
+ return instance_.get();
+}
+} // namespace GpgFrontend
diff --git a/src/core/common/CoreCommonUtil.h b/src/core/common/CoreCommonUtil.h
index 074b4fd3..3762c4f0 100644
--- a/src/core/common/CoreCommonUtil.h
+++ b/src/core/common/CoreCommonUtil.h
@@ -1,63 +1,63 @@
-/**
- * Copyright (C) 2021 Saturneric
- *
- * This file is part of GpgFrontend.
- *
- * GpgFrontend is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GpgFrontend is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>.
- *
- * The initial version of the source code is inherited from
- * the gpg4usb project, which is under GPL-3.0-or-later.
- *
- * The source code version of this software was modified and released
- * by Saturneric<[email protected]><[email protected]> starting on May 12, 2021.
- *
- */
-
-#ifndef GPGFRONTEND_CORECOMMONUTIL_H
-#define GPGFRONTEND_CORECOMMONUTIL_H
-
-#include "core/GpgFrontendCore.h"
-
-namespace GpgFrontend {
-
-class GPGFRONTEND_CORE_EXPORT CoreCommonUtil : public QObject {
- Q_OBJECT
- public:
- /**
- * @brief Construct a new Core Common Util object
- *
- */
- static CoreCommonUtil *GetInstance();
-
- /**
- * @brief
- *
- */
- CoreCommonUtil() = default;
-
- signals:
-
- /**
- * @brief
- *
- */
- void SignalGnupgNotInstall();
-
- private:
- static std::unique_ptr<CoreCommonUtil> instance_; ///<
-};
-
-} // namespace GpgFrontend
-
-#endif // GPGFRONTEND_CORECOMMONUTIL_H
+/**
+ * Copyright (C) 2021 Saturneric
+ *
+ * This file is part of GpgFrontend.
+ *
+ * GpgFrontend is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GpgFrontend is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * The initial version of the source code is inherited from
+ * the gpg4usb project, which is under GPL-3.0-or-later.
+ *
+ * The source code version of this software was modified and released
+ * by Saturneric<[email protected]><[email protected]> starting on May 12, 2021.
+ *
+ */
+
+#ifndef GPGFRONTEND_CORECOMMONUTIL_H
+#define GPGFRONTEND_CORECOMMONUTIL_H
+
+#include "core/GpgFrontendCore.h"
+
+namespace GpgFrontend {
+
+class GPGFRONTEND_CORE_EXPORT CoreCommonUtil : public QObject {
+ Q_OBJECT
+ public:
+ /**
+ * @brief Construct a new Core Common Util object
+ *
+ */
+ static CoreCommonUtil *GetInstance();
+
+ /**
+ * @brief
+ *
+ */
+ CoreCommonUtil() = default;
+
+ signals:
+
+ /**
+ * @brief
+ *
+ */
+ void SignalGnupgNotInstall();
+
+ private:
+ static std::unique_ptr<CoreCommonUtil> instance_; ///<
+};
+
+} // namespace GpgFrontend
+
+#endif // GPGFRONTEND_CORECOMMONUTIL_H