Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed a few CMake issues under Linux #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 3 additions & 1 deletion CMake/SkyXDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "" "")

#######################################################################
Expand Down Expand Up @@ -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}
)

Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -158,6 +159,8 @@ if(SKYX_BUILD_SAMPLES)
add_subdirectory(SkyXDemo3)
endif(SKYX_BUILD_SAMPLES)



# Install CMake modules
add_subdirectory(CMake)

Expand Down
4 changes: 2 additions & 2 deletions SkyX/Source/MeshManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace SkyX
MeshManager::MeshManager(SkyX *s)
: mSkyX(s)
, mCreated(false)
, mMesh(0)
, mMesh(static_cast<Ogre::Mesh*>(0))
, mSubMesh(0)
, mEntity(0)
, mVertexBuffer(0)
Expand Down Expand Up @@ -368,4 +368,4 @@ namespace SkyX

return cameraFarClipDistance*mRadiusMultiplier;
}
}
}
6 changes: 3 additions & 3 deletions SkyX/Source/VClouds/VClouds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ namespace SkyX { namespace VClouds
, mGeometryManager(new GeometryManager(this))
, mLightningManager(new LightningManager(this))
, mCamerasData(std::vector<CameraData>())
, mVolCloudsMaterial(Ogre::MeshPtr())
, mVolCloudsLightningMaterial(Ogre::MeshPtr())
, mVolCloudsMaterial(Ogre::MaterialPtr())
, mVolCloudsLightningMaterial(Ogre::MaterialPtr())
{
}

Expand Down Expand Up @@ -327,4 +327,4 @@ namespace SkyX { namespace VClouds
mDataManager->setWheater(mWheater.x, mWheater.y, mDelayedResponse);
}

}}
}}
2 changes: 1 addition & 1 deletion SkyXDemo1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion SkyXDemo1/Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Ogre.h just expands to including lots of individual OGRE header files
// ----------------------------------------------------------------------------
#include <Ogre.h>
#include <OgreTextAreaOverlayElement.h>
#include <Overlay/OgreTextAreaOverlayElement.h>

// ----------------------------------------------------------------------------
// Include the OGRE example framework
Expand Down
2 changes: 1 addition & 1 deletion SkyXDemo2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion SkyXDemo2/Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Ogre.h just expands to including lots of individual OGRE header files
// ----------------------------------------------------------------------------
#include <Ogre.h>
#include <OgreTextAreaOverlayElement.h>
#include <Overlay/OgreTextAreaOverlayElement.h>

// ----------------------------------------------------------------------------
// Include the OGRE example framework
Expand Down
2 changes: 1 addition & 1 deletion SkyXDemo3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion SkyXDemo3/Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Ogre.h just expands to including lots of individual OGRE header files
// ----------------------------------------------------------------------------
#include <Ogre.h>
#include <OgreTextAreaOverlayElement.h>
#include <Overlay/OgreTextAreaOverlayElement.h>

// ----------------------------------------------------------------------------
// Include the OGRE example framework
Expand Down