From 36120c7d24a84ac7d49891f6d083e54bfd57116f Mon Sep 17 00:00:00 2001 From: Danduk82 Date: Sat, 22 Mar 2014 16:52:39 +0100 Subject: [PATCH 1/4] bug fix: CMAKE_MODULE_PATH provided in cmdline arguement was not considered, fixed in main CMakeLists.txt. --- CMake/SkyXDependencies.cmake | 1 + CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/CMake/SkyXDependencies.cmake b/CMake/SkyXDependencies.cmake index b5d02fe..9fdb793 100644 --- a/CMake/SkyXDependencies.cmake +++ b/CMake/SkyXDependencies.cmake @@ -31,6 +31,7 @@ endif () set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${SKYX_DEP_SEARCH_PATH}) set(CMAKE_FRAMEWORK_PATH ${CMAKE_FRAMEWORK_PATH} ${SKYX_DEP_SEARCH_PATH}) +message(STATUS "CMAKE_MODULE_PATH in SkyXDependencies = ${CMAKE_MODULE_PATH}") ####################################################################### # Core dependencies diff --git a/CMakeLists.txt b/CMakeLists.txt index 3642923..1208951 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ cmake_policy(SET CMP0003 NEW) project(SKYX) # Include necessary submodules set(CMAKE_MODULE_PATH + "${CMAKE_MODULE_PATH}" "${SKYX_SOURCE_DIR}/CMake" "${SKYX_SOURCE_DIR}/CMake/Utils" ) From 9e41b19d9241a01bcebb7385840d38aca1a2f974 Mon Sep 17 00:00:00 2001 From: Danduk82 Date: Sat, 22 Mar 2014 17:18:04 +0100 Subject: [PATCH 2/4] bug fix: added the definition of SKYX_INSTALL_LIB before installing CMake files. Was crashing under linux because it wanted to write to /SKYX , which is forbidden --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1208951..5220e36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,6 +159,8 @@ if(SKYX_BUILD_SAMPLES) add_subdirectory(SkyXDemo3) endif(SKYX_BUILD_SAMPLES) + +set(SKYX_LIB_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib) # Install CMake modules add_subdirectory(CMake) From faa34bf63cfa502533a9a88b7da0a624b9810de5 Mon Sep 17 00:00:00 2001 From: Danduk82 Date: Sat, 22 Mar 2014 17:39:37 +0100 Subject: [PATCH 3/4] same fix as before, but I prefer to put it in CMake/CMakeLists.txt instead of CMakeLists.txt... --- CMake/CMakeLists.txt | 1 + CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt index 84ab1d8..d85d79c 100644 --- a/CMake/CMakeLists.txt +++ b/CMake/CMakeLists.txt @@ -14,6 +14,7 @@ if(WIN32 OR APPLE) set(SKYX_CMAKE_DIR "CMake") else() + set(SKYX_LIB_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib) set(SKYX_CMAKE_DIR "${SKYX_LIB_DIRECTORY}/SKYX/cmake") endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 5220e36..de03499 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,7 @@ if(SKYX_BUILD_SAMPLES) endif(SKYX_BUILD_SAMPLES) -set(SKYX_LIB_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib) + # Install CMake modules add_subdirectory(CMake) From 2d51a369f131184de2a910e6aae2d9b8d339cfa9 Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Tue, 27 May 2014 15:50:04 -0700 Subject: [PATCH 4/4] Added compatibility with Ogre 1.9 --- CMake/SkyXDependencies.cmake | 3 ++- SkyX/Source/MeshManager.cpp | 4 ++-- SkyX/Source/VClouds/VClouds.cpp | 6 +++--- SkyXDemo1/CMakeLists.txt | 2 +- SkyXDemo1/Source/main.cpp | 2 +- SkyXDemo2/CMakeLists.txt | 2 +- SkyXDemo2/Source/main.cpp | 2 +- SkyXDemo3/CMakeLists.txt | 2 +- SkyXDemo3/Source/main.cpp | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CMake/SkyXDependencies.cmake b/CMake/SkyXDependencies.cmake index b5d02fe..892447e 100644 --- a/CMake/SkyXDependencies.cmake +++ b/CMake/SkyXDependencies.cmake @@ -56,7 +56,7 @@ macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" macro_log_feature(Boost_DATE_TIME_FOUND "boost-date_time" "Used for threading support" "http://boost.org" FALSE "" "") # Find Ogre 3D, plus terrain and paging components -find_package(OGRE) +find_package(OGRE COMPONENTS) macro_log_feature(OGRE_FOUND "OGRE" "3D library needed for the OgreGraphics plugin" "http://" TRUE "" "") ####################################################################### @@ -85,6 +85,7 @@ MACRO_DISPLAY_FEATURE_LOG() # Add library and include paths from the dependencies include_directories( ${OGRE_INCLUDE_DIRS} + ${OGRE_INCLUDE_DIRS}/Overlay ${Boost_INCLUDE_DIRS} ) diff --git a/SkyX/Source/MeshManager.cpp b/SkyX/Source/MeshManager.cpp index 26d389c..aa5e4f3 100644 --- a/SkyX/Source/MeshManager.cpp +++ b/SkyX/Source/MeshManager.cpp @@ -30,7 +30,7 @@ namespace SkyX MeshManager::MeshManager(SkyX *s) : mSkyX(s) , mCreated(false) - , mMesh(0) + , mMesh(static_cast(0)) , mSubMesh(0) , mEntity(0) , mVertexBuffer(0) @@ -368,4 +368,4 @@ namespace SkyX return cameraFarClipDistance*mRadiusMultiplier; } -} \ No newline at end of file +} diff --git a/SkyX/Source/VClouds/VClouds.cpp b/SkyX/Source/VClouds/VClouds.cpp index 4311e29..576d6a8 100644 --- a/SkyX/Source/VClouds/VClouds.cpp +++ b/SkyX/Source/VClouds/VClouds.cpp @@ -51,8 +51,8 @@ namespace SkyX { namespace VClouds , mGeometryManager(new GeometryManager(this)) , mLightningManager(new LightningManager(this)) , mCamerasData(std::vector()) - , mVolCloudsMaterial(Ogre::MeshPtr()) - , mVolCloudsLightningMaterial(Ogre::MeshPtr()) + , mVolCloudsMaterial(Ogre::MaterialPtr()) + , mVolCloudsLightningMaterial(Ogre::MaterialPtr()) { } @@ -327,4 +327,4 @@ namespace SkyX { namespace VClouds mDataManager->setWheater(mWheater.x, mWheater.y, mDelayedResponse); } -}} \ No newline at end of file +}} diff --git a/SkyXDemo1/CMakeLists.txt b/SkyXDemo1/CMakeLists.txt index ac6bc5e..58fad9f 100644 --- a/SkyXDemo1/CMakeLists.txt +++ b/SkyXDemo1/CMakeLists.txt @@ -34,7 +34,7 @@ endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../SkyX/Include ${OIS_INCLUDE_DIR} ${STATIC_DEPS_INCLUDE_DIRS}) add_executable(SkyXDemo1 ${SOURCE_FILES}) -target_link_libraries(SkyXDemo1 ${SKYX_LIBRARIES} ${OIS_LIBRARY} ${STATIC_DEPS_LIBRARIES}) +target_link_libraries(SkyXDemo1 ${SKYX_LIBRARIES} ${OIS_LIBRARY} ${STATIC_DEPS_LIBRARIES} OgreOverlay) # Install sample sources if (SKYX_INSTALL_SAMPLES) diff --git a/SkyXDemo1/Source/main.cpp b/SkyXDemo1/Source/main.cpp index 5398b2d..0d4eea4 100644 --- a/SkyXDemo1/Source/main.cpp +++ b/SkyXDemo1/Source/main.cpp @@ -11,7 +11,7 @@ // Ogre.h just expands to including lots of individual OGRE header files // ---------------------------------------------------------------------------- #include -#include +#include // ---------------------------------------------------------------------------- // Include the OGRE example framework diff --git a/SkyXDemo2/CMakeLists.txt b/SkyXDemo2/CMakeLists.txt index d917ce4..eb42df3 100644 --- a/SkyXDemo2/CMakeLists.txt +++ b/SkyXDemo2/CMakeLists.txt @@ -34,7 +34,7 @@ endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../SkyX/Include ${OIS_INCLUDE_DIR} ${STATIC_DEPS_INCLUDE_DIRS}) add_executable(SkyXDemo2 ${SOURCE_FILES}) -target_link_libraries(SkyXDemo2 ${SKYX_LIBRARIES} ${OIS_LIBRARY} ${STATIC_DEPS_LIBRARIES}) +target_link_libraries(SkyXDemo2 ${SKYX_LIBRARIES} ${OIS_LIBRARY} ${STATIC_DEPS_LIBRARIES} OgreOverlay) # Install sample sources if (SKYX_INSTALL_SAMPLES) diff --git a/SkyXDemo2/Source/main.cpp b/SkyXDemo2/Source/main.cpp index d1ca0c7..6cb854d 100644 --- a/SkyXDemo2/Source/main.cpp +++ b/SkyXDemo2/Source/main.cpp @@ -10,7 +10,7 @@ // Ogre.h just expands to including lots of individual OGRE header files // ---------------------------------------------------------------------------- #include -#include +#include // ---------------------------------------------------------------------------- // Include the OGRE example framework diff --git a/SkyXDemo3/CMakeLists.txt b/SkyXDemo3/CMakeLists.txt index af39670..a93c7c7 100644 --- a/SkyXDemo3/CMakeLists.txt +++ b/SkyXDemo3/CMakeLists.txt @@ -34,7 +34,7 @@ endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../SkyX/Include ${OIS_INCLUDE_DIR} ${STATIC_DEPS_INCLUDE_DIRS}) add_executable(SkyXDemo3 ${SOURCE_FILES}) -target_link_libraries(SkyXDemo3 ${SKYX_LIBRARIES} ${OIS_LIBRARY} ${STATIC_DEPS_LIBRARIES}) +target_link_libraries(SkyXDemo3 ${SKYX_LIBRARIES} ${OIS_LIBRARY} ${STATIC_DEPS_LIBRARIES} OgreOverlay) # Install sample sources if (SKYX_INSTALL_SAMPLES) diff --git a/SkyXDemo3/Source/main.cpp b/SkyXDemo3/Source/main.cpp index c4e43c4..31a6abc 100644 --- a/SkyXDemo3/Source/main.cpp +++ b/SkyXDemo3/Source/main.cpp @@ -10,7 +10,7 @@ // Ogre.h just expands to including lots of individual OGRE header files // ---------------------------------------------------------------------------- #include -#include +#include // ---------------------------------------------------------------------------- // Include the OGRE example framework