diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d9651a..63160ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,7 +48,6 @@ if(APPLE)
endif()
list(APPEND GTA5VIEW_DEFINES
- -DBOOST_JSON_STANDALONE
-DGTA5SYNC_CMAKE
-DGTA5SYNC_PROJECT
)
@@ -140,7 +139,6 @@ set(GTA5VIEW_HEADERS
set(GTA5VIEW_INCLUDEDIR
src
src/anpro
- src/json/include
src/pcg
src/uimod
)
@@ -231,6 +229,29 @@ if(RAGEPHOTO_ABI_WRAPPER)
)
endif()
+option(WITH_BOOST "Use linked Boost library" OFF)
+if(WITH_BOOST)
+ find_package(Boost REQUIRED
+ COMPONENTS json
+ )
+ list(APPEND GTA5VIEW_LIBS
+ Boost::json
+ )
+ list(APPEND GTA5VIEW_DEFINES
+ -DGTA5SYNC_BOOST
+ )
+ list(APPEND GTA5VIEW_INCLUDEDIR
+ ${Boost_INCLUDE_DIRS}
+ )
+else()
+ list(APPEND GTA5VIEW_DEFINES
+ -DBOOST_JSON_STANDALONE
+ )
+ list(APPEND GTA5VIEW_INCLUDEDIR
+ src/json/include
+ )
+endif()
+
option(WITH_DONATE "Donate menu option and donation dialog" OFF)
if(WITH_DONATE)
set(DONATE_ADDRESSES "" CACHE STRING "Donation addresses")
diff --git a/src/SnapmaticJson.cpp b/src/SnapmaticJson.cpp
index cff9fff..ff04511 100644
--- a/src/SnapmaticJson.cpp
+++ b/src/SnapmaticJson.cpp
@@ -16,9 +16,11 @@
* along with this program. If not, see .
*****************************************************************************/
+#ifndef GTA5SYNC_BOOST
#include
-#include
+#endif
#include "SnapmaticJson.h"
+#include
void serializer(std::ostream &os, const boost::json::value &jv, std::string *indent, bool do_indent)
{
diff --git a/src/libragephoto b/src/libragephoto
index 9339184..d8c0d7d 160000
--- a/src/libragephoto
+++ b/src/libragephoto
@@ -1 +1 @@
-Subproject commit 933918454f16af118a3cb9e1359a00bca589d7e7
+Subproject commit d8c0d7d47031c670443722db13e3c67c9c7f33a9