mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-18 10:59:18 -06:00
Correctly copy libraries
Combine SyncWidget and openspace::DownloadManager
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "syncwidget.h"
|
||||
|
||||
#include <openspace/engine/downloadmanager.h>
|
||||
|
||||
#include <ghoul/ghoul.h>
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <ghoul/lua/ghoul_lua.h>
|
||||
@@ -42,6 +44,12 @@ SyncWidget::SyncWidget(QWidget* parent)
|
||||
|
||||
ghoul::initialize();
|
||||
|
||||
openspace::DownloadManager::initialize("http://openspace.itn.liu.se/request.cgi");
|
||||
}
|
||||
|
||||
SyncWidget::~SyncWidget() {
|
||||
openspace::DownloadManager::deinitialize();
|
||||
ghoul::deinitialize();
|
||||
}
|
||||
|
||||
void SyncWidget::setSceneFile(QString scene) {
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
class SyncWidget : public QWidget {
|
||||
public:
|
||||
SyncWidget(QWidget* parent);
|
||||
~SyncWidget();
|
||||
|
||||
void setSceneFile(QString scene);
|
||||
|
||||
|
||||
Submodule ext/ghoul updated: c660e8dd75...eb66778e0a
@@ -50,6 +50,7 @@ public:
|
||||
static const std::string KeyLogImmediateFlush;
|
||||
static const std::string KeyLogs;
|
||||
static const std::string KeyDisableMasterRendering;
|
||||
static const std::string KeyDownloadRequestURL;
|
||||
|
||||
bool loadFromFile(const std::string& filename);
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ const std::string ConfigurationManager::KeyLogLevel = "Logging.LogLevel";
|
||||
const std::string ConfigurationManager::KeyLogImmediateFlush = "Logging.ImmediateFlush";
|
||||
const std::string ConfigurationManager::KeyLogs = "Logging.Logs";
|
||||
const std::string ConfigurationManager::KeyDisableMasterRendering = "DisableRenderingOnMaster";
|
||||
const std::string ConfigurationManager::KeyDownloadRequestURL = "DownloadRequestURL";
|
||||
|
||||
bool ConfigurationManager::loadFromFile(const std::string& filename) {
|
||||
using ghoul::filesystem::FileSystem;
|
||||
|
||||
@@ -290,7 +290,7 @@ bool OpenSpaceEngine::initialize() {
|
||||
SysCap.logCapabilities();
|
||||
|
||||
std::string requestURL = "";
|
||||
bool success = configurationManager()->getValue(KeyDownloadRequestURL, requestURL);
|
||||
bool success = configurationManager()->getValue(ConfigurationManager::KeyDownloadRequestURL, requestURL);
|
||||
if (success)
|
||||
DownloadManager::initialize(requestURL);
|
||||
|
||||
|
||||
@@ -166,10 +166,10 @@ function (add_external_dependencies)
|
||||
# Curl
|
||||
if (WIN32)
|
||||
set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl")
|
||||
set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl" PARENT_SCOPE)
|
||||
target_include_directories(libOpenSpace SYSTEM PUBLIC ${CURL_ROOT_DIR}/include)
|
||||
target_link_libraries(libOpenSpace ${CURL_ROOT_DIR}/lib/libcurl_imp.lib)
|
||||
target_compile_definitions(libOpenSpace PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB")
|
||||
copy_files(OpenSpace "${CURL_ROOT_DIR}/lib/libcurl.dll")
|
||||
else ()
|
||||
find_package(curl)
|
||||
if (CURL_FOUND)
|
||||
@@ -437,6 +437,9 @@ endfunction ()
|
||||
|
||||
function (copy_dynamic_libraries)
|
||||
if (WIN32)
|
||||
|
||||
copy_files(OpenSpace "${CURL_ROOT_DIR}/lib/libcurl.dll")
|
||||
|
||||
# Copy DLLs needed by Ghoul into the executable directory
|
||||
ghl_copy_shared_libraries(OpenSpace ${OPENSPACE_EXT_DIR}/ghoul)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user