Skip to content

Commit

Permalink
Fixed config.h, now it appears in build dir
Browse files Browse the repository at this point in the history
Fixed resources location

git-svn-id: http://qtlobby.googlecode.com/svn/trunk@572 5a83989a-60d1-11de-a6a3-193033c112f2
  • Loading branch information
[email protected] committed Sep 14, 2009
1 parent 8e0780a commit 39414b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ endif(WIN32 OR BUILDBOT)
find_package(QScintilla REQUIRED)
find_package(QtScriptTools REQUIRED)

CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_SOURCE_DIR}/src/config.h )

file(GLOB jobjol "${CMAKE_SOURCE_DIR}/share/qtlobby/icons/jobjol/?*.*")
install(FILES ${jobjol} DESTINATION share/qtlobby/icons/jobjol)
file(GLOB trolltech "${CMAKE_SOURCE_DIR}/share/qtlobby/icons/trolltech/?*.*")
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include(${QT_USE_FILE})
include_directories(${QTSCRIPTTOOLS_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )

# source files
set(qtlobby_SRCS
Expand Down Expand Up @@ -103,8 +104,7 @@ Channel.h
ChannelTextBrowser.h
CommandAssigner.h
Command.h
CompletionListWidget.h
config.h
CompletionListWidget.h
ConnectionWidget.h
Downloader.h
DownloadsDialog.h
Expand Down
1 change: 1 addition & 0 deletions src/config.h.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef CONFIG_H_
#define CONFIG_H_

#cmakedefine CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
#cmakedefine QTLOBBY_VERSION "@QTLOBBY_VERSION@"
#cmakedefine SVN_REV "@SVN_REV@"
#cmakedefine PURE_WINAPI_UNITSYNC_LOADER
Expand Down
8 changes: 4 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ int main( int argc, char *argv[] ) {
#endif
QApplication app( argc, argv );
QStringList args = app.arguments();
QStringList list = args.at(0).split(QDir::separator());
list.removeLast();
#ifndef Q_WS_WIN
list.removeLast();//windows does not have bin folder, so no need to get one level higher
PathManager::getInstance()->setResourceRoot(QString(CMAKE_INSTALL_PREFIX)+"/share/qtlobby/");
#else
QStringList list = args.at(0).split(QDir::separator());
list.removeLast();
QCoreApplication::addLibraryPath(list.join(QDir::separator())+QDir::separator()+"qt");
#endif
list.append("share");
list.append("qtlobby");
PathManager::getInstance()->setResourceRoot(list.join(QDir::separator())+QDir::separator());
#endif
for(int i = 1; i < args.size(); i++) {
if(args.at(i) == "--3dpreview" || args.at(i) == "-3d") {
i++;
Expand Down

0 comments on commit 39414b1

Please sign in to comment.