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/CMake/SkyXDependencies.cmake b/CMake/SkyXDependencies.cmake index b5d02fe..f7663f7 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 @@ -56,7 +57,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 +86,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/CMakeLists.txt b/CMakeLists.txt index 3642923..de03499 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" ) @@ -158,6 +159,8 @@ if(SKYX_BUILD_SAMPLES) add_subdirectory(SkyXDemo3) endif(SKYX_BUILD_SAMPLES) + + # Install CMake modules add_subdirectory(CMake) 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