[Orxonox-commit 5606] r10268 - in code/trunk: cmake/tools src src/libraries/core
landauf at orxonox.net
landauf at orxonox.net
Thu Feb 12 23:28:26 CET 2015
Author: landauf
Date: 2015-02-12 23:28:26 +0100 (Thu, 12 Feb 2015)
New Revision: 10268
Modified:
code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake
code/trunk/src/CMakeLists.txt
code/trunk/src/libraries/core/CMakeLists.txt
code/trunk/src/libraries/core/GraphicsManager.cc
Log:
program icon now works also with MinGW. but I had to exclude the PCH-file for the resource file
Modified: code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake
===================================================================
--- code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake 2015-02-12 17:05:25 UTC (rev 10267)
+++ code/trunk/cmake/tools/PrecompiledHeaderFiles.cmake 2015-02-12 22:28:26 UTC (rev 10268)
@@ -103,7 +103,8 @@
# Set Compile flags for the other source files
FOREACH(_file ${_source_files})
GET_SOURCE_FILE_PROPERTY(_is_header ${_file} HEADER_FILE_ONLY)
- IF(NOT _is_header)
+ # Don't use pch file for header-only files and *.rc files
+ IF((NOT _is_header) AND (NOT _file MATCHES "\\.rc$"))
GET_SOURCE_FILE_PROPERTY(_old_flags ${_file} COMPILE_FLAGS)
IF(NOT _old_flags)
SET(_old_flags "")
@@ -112,7 +113,7 @@
COMPILE_FLAGS "${_old_flags} -I ${CMAKE_CURRENT_SOURCE_DIR} -include ${_pch_header_filename}"
OBJECT_DEPENDS "${_pch_header_file}"
)
- ENDIF(NOT _is_header)
+ ENDIF()
ENDFOREACH(_file)
ENDIF()
Modified: code/trunk/src/CMakeLists.txt
===================================================================
--- code/trunk/src/CMakeLists.txt 2015-02-12 17:05:25 UTC (rev 10267)
+++ code/trunk/src/CMakeLists.txt 2015-02-12 22:28:26 UTC (rev 10268)
@@ -58,8 +58,7 @@
IF(APPLE)
LIST(APPEND ORXONOX_MAIN_FILES OrxonoxMac.mm)
# Add the icon for win32 builds
-# TODO: does this work for mingw too?
-ELSEIF(WIN32 AND MSVC)
+ELSEIF(WIN32)
LIST(APPEND ORXONOX_MAIN_FILES ${CMAKE_SOURCE_DIR}/contrib/winresource.rc)
ENDIF()
Modified: code/trunk/src/libraries/core/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/core/CMakeLists.txt 2015-02-12 17:05:25 UTC (rev 10267)
+++ code/trunk/src/libraries/core/CMakeLists.txt 2015-02-12 22:28:26 UTC (rev 10268)
@@ -68,7 +68,7 @@
ADD_SUBDIRECTORY(object)
#Add the icon (for the renderwindow)
-IF(WIN32 AND MSVC)
+IF(WIN32)
List(APPEND CORE_SRC_FILES ${CMAKE_SOURCE_DIR}/contrib/winresource.rc)
ENDIF()
Modified: code/trunk/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/trunk/src/libraries/core/GraphicsManager.cc 2015-02-12 17:05:25 UTC (rev 10267)
+++ code/trunk/src/libraries/core/GraphicsManager.cc 2015-02-12 22:28:26 UTC (rev 10268)
@@ -317,7 +317,7 @@
Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(Ogre::MIP_UNLIMITED);
//Add program icon
-#if defined(ORXONOX_PLATFORM_WINDOWS) && defined(_MSC_VER)
+#if defined(ORXONOX_PLATFORM_WINDOWS)
HWND hwnd;
this->renderWindow_->getCustomAttribute("WINDOW", (void*)&hwnd);
LONG iconID = (LONG)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(101));
More information about the Orxonox-commit
mailing list