Removed dependency to GLib/GThread
This commit is contained in:
parent
25d14a43ce
commit
ad1a492884
7 changed files with 9 additions and 19 deletions
2
Makefile
2
Makefile
|
@ -61,7 +61,7 @@ install:release
|
||||||
cp cache/*.cache ${DESTDIR}/usr/share/paysages3d/
|
cp cache/*.cache ${DESTDIR}/usr/share/paysages3d/
|
||||||
|
|
||||||
deb:
|
deb:
|
||||||
apt-get install pbuilder build-essential check libdevil-dev libglib2.0-dev qt4-dev-tools
|
apt-get install pbuilder build-essential check qt4-dev-tools
|
||||||
DEBFULLNAME="Michael Lemaire" DEBEMAIL=paysages@thunderk.net dch -i -p -u low -D stable
|
DEBFULLNAME="Michael Lemaire" DEBEMAIL=paysages@thunderk.net dch -i -p -u low -D stable
|
||||||
debuild -b -us -uc
|
debuild -b -us -uc
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ QT += core gui opengl
|
||||||
TARGET = paysages-gui
|
TARGET = paysages-gui
|
||||||
|
|
||||||
unix:LIBS += -lGLU
|
unix:LIBS += -lGLU
|
||||||
win32:LIBS += ../../libpaysages.a -lglib-2.0 -lgthread-2.0
|
win32:LIBS += ../../libpaysages.a
|
||||||
|
|
||||||
CONFIG(release, debug|release): DEFINES += NDEBUG
|
CONFIG(release, debug|release): DEFINES += NDEBUG
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,6 @@ TARGET = paysages_rendering
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/..
|
INCLUDEPATH += $$PWD/..
|
||||||
|
|
||||||
unix {
|
|
||||||
CONFIG += link_pkgconfig
|
|
||||||
PKGCONFIG += glib-2.0 gthread-2.0
|
|
||||||
}
|
|
||||||
DEFINES += HAVE_GLIB=1
|
|
||||||
CONFIG(release, debug|release): DEFINES += NDEBUG
|
CONFIG(release, debug|release): DEFINES += NDEBUG
|
||||||
|
|
||||||
SOURCES += main.c \
|
SOURCES += main.c \
|
||||||
|
|
|
@ -47,9 +47,6 @@ static int _getCoreCount()
|
||||||
|
|
||||||
void systemInit()
|
void systemInit()
|
||||||
{
|
{
|
||||||
#ifndef GLIB_VERSION_2_32
|
|
||||||
g_thread_init(NULL);
|
|
||||||
#endif
|
|
||||||
_core_count = _getCoreCount();
|
_core_count = _getCoreCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,15 +14,6 @@ int systemGetCoreCount();
|
||||||
|
|
||||||
int systemGetFileSize(const char* path);
|
int systemGetFileSize(const char* path);
|
||||||
|
|
||||||
#ifdef HAVE_GLIB
|
|
||||||
#include <glib.h>
|
|
||||||
|
|
||||||
static inline void timeSleepMs(unsigned long ms)
|
|
||||||
{
|
|
||||||
g_usleep(ms * 1000);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,3 +43,8 @@ void* threadJoin(Thread* thread)
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void timeSleepMs(unsigned long ms)
|
||||||
|
{
|
||||||
|
QThread::msleep(ms);
|
||||||
|
}
|
||||||
|
|
|
@ -64,6 +64,8 @@ typedef struct Thread Thread;
|
||||||
Thread* threadCreate(ThreadFunction function, void* data);
|
Thread* threadCreate(ThreadFunction function, void* data);
|
||||||
void* threadJoin(Thread* thread);
|
void* threadJoin(Thread* thread);
|
||||||
|
|
||||||
|
void timeSleepMs(unsigned long ms);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue