Fix package management compiling with linux
This commit is contained in:
@@ -23,8 +23,8 @@ if (SIMGEAR_SHARED)
|
|||||||
set(APP_LIBS SimGearCore)
|
set(APP_LIBS SimGearCore)
|
||||||
else()
|
else()
|
||||||
set(APP_LIBS
|
set(APP_LIBS
|
||||||
${LibArchive_LIBRARIES}
|
|
||||||
SimGearCore
|
SimGearCore
|
||||||
|
${LibArchive_LIBRARIES}
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${WINSOCK_LIBRARY}
|
${WINSOCK_LIBRARY}
|
||||||
${ZLIB_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <simgear/package/Catalog.hxx>
|
#include <simgear/package/Catalog.hxx>
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
|
#include <algorithm>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Package* Root::getPackageById(const std::string& aName) const
|
|||||||
size_t lastDot = aName.rfind('.');
|
size_t lastDot = aName.rfind('.');
|
||||||
|
|
||||||
Package* pkg = NULL;
|
Package* pkg = NULL;
|
||||||
if (lastDot == -1) {
|
if (lastDot == std::string::npos) {
|
||||||
// naked package ID
|
// naked package ID
|
||||||
CatalogDict::const_iterator it = m_catalogs.begin();
|
CatalogDict::const_iterator it = m_catalogs.begin();
|
||||||
for (; it != m_catalogs.end(); ++it) {
|
for (; it != m_catalogs.end(); ++it) {
|
||||||
|
|||||||
Reference in New Issue
Block a user