Commits

Jeremy Sandell committed 6906f31

updated CMakeLists so that system will compile on my machines.

Comments (0)

Files changed (4)

+regexp:^build\/\.*
+regexp:^.*\.o
+regexp:^.*\.swp
+regexp:^.*\.exe
+regexp:^.*\.a
+regexp:^.*\.so
+regexp:^.*\.pc
+regexp:^.*\.html
+regexp:^.*\.log
+regexp:^.*\.bin
 cmake_minimum_required(VERSION 2.6)
 
-PROJECT(CCS)
+project(CCS)
 
 # Include necessary submodules
-SET( CMAKE_MODULE_PATH
+set(CMAKE_MODULE_PATH
   "${CCS_SOURCE_DIR}/CMake"
   "${CCS_SOURCE_DIR}/CMake/Utils"
   "${CCS_SOURCE_DIR}/CMake/Packages"
 )
 
-FIND_PACKAGE(OGRE)
+find_package(OGRE)
 
-IF(OGRE_FOUND)
-    SET( CCS_PATH_TO_OGRE_INCLUDE ${CCS_PATH_TO_OGRE_INCLUDE} ${OGRE_INCLUDE_DIRS} )
-    SET( CCS_PATH_TO_LIBRARIES ${CCS_PATH_TO_LIBRARIES} )
-    SET( CCS_DEMO_INCLUDES ${CCS_DEMO_INCLUDES} ${CCS_PATH_TO_OGRE_INCLUDE} )
-ENDIF(OGRE_FOUND)
+if(OGRE_FOUND)
+    set(CCS_PATH_TO_OGRE_INCLUDE ${CCS_PATH_TO_OGRE_INCLUDE} ${OGRE_INCLUDE_DIRS})
+    set(CCS_PATH_TO_LIBRARIES ${CCS_PATH_TO_LIBRARIES})
+    set(CCS_DEMO_INCLUDES ${CCS_DEMO_INCLUDES} ${CCS_PATH_TO_OGRE_INCLUDE})
+endif(OGRE_FOUND)
 
 if (CMAKE_BUILD_TYPE STREQUAL "")
   # CMake defaults to leaving CMAKE_BUILD_TYPE empty. This screws up
     set(SUFF "_d")
 endif()
 
-SET( CCS_BUILD_DEMOS true CACHE BOOL "Build Demos." )
-SET( CCS_BUILD_STATIC false CACHE BOOL "Build as static library." )
+set(CCS_BUILD_DEMOS false CACHE BOOL "Build Demos.")
+set(CCS_BUILD_STATIC false CACHE BOOL "Build as static library.")
 
+include_directories(CameraControlSystem/include)
 add_subdirectory(CameraControlSystem)
 
-IF(CCS_BUILD_DEMOS)
-    add_subdirectory(CameraControlSystemSDKDemo)
-ENDIF(CCS_BUILD_DEMOS)
+if(CCS_BUILD_DEMOS)
+    add_subdirectory(CameraControlSystemDemo)
+endif(CCS_BUILD_DEMOS)

CameraControlSystem/CMakeLists.txt

-include_directories(include)
-
 include_directories(${CCS_PATH_TO_OGRE_INCLUDE})
 
-IF( CCS_BUILD_STATIC )
-    message( "Building as static" )
-    SET( CCS_LIBRARY_TYPE STATIC )
-ELSE()
-    message( "Building as shared" )
-    SET( CCS_LIBRARY_TYPE SHARED )
-ENDIF()
+if(CCS_BUILD_STATIC)
+    message("Building as static")
+    set(CCS_LIBRARY_TYPE STATIC)
 
-add_library ( CCS${SUFF} ${CCS_LIBRARY_TYPE}
-    src/CCSBasicCameraModes.cpp
-    src/CCSCameraControlSystem.cpp
-	src/CCSCollidableOrbitalCameraMode.cpp
-    src/CCSFreeCameraMode.cpp
-    src/CCSOrbitalCameraMode.cpp
-    src/CCSPrerequisites.cpp
-)
+else()
+    message("Building as shared")
+    set(CCS_LIBRARY_TYPE SHARED)
+
+endif()
+
+set(HEADERS
+    ./include/CCSBasicCameraModes.h
+    ./include/CCSCameraControlSystem.h
+    ./include/CCSFastDelegateBind.h
+    ./include/CCSFastDelegate.h
+    ./include/CCSFreeCameraMode.h
+    ./include/CCSOrbitalCameraMode.h
+    ./include/CCSPrerequisites.h
+    ./include/CCSSphericCameraMode.h
+)
+
+set(SOURCES
+    ./src/CCSBasicCameraModes.cpp
+    ./src/CCSCameraControlSystem.cpp
+#    ./src/CCSCollidableOrbitalCameraMode.cpp
+    ./src/CCSFreeCameraMode.cpp
+    ./src/CCSOrbitalCameraMode.cpp
+    ./src/CCSPrerequisites.cpp
+)
+
+include_directories(./include)
+
+add_library(CCS${SUFF} ${CCS_LIBRARY_TYPE} ${HEADERS} ${SOURCES})
+

CameraControlSystemSDKDemo/CMakeLists.txt

-message( "Building SDK Demo" )
+message("Building SDK Demo")
 
-SET( CCS_PATH_TO_OGRE_EXAMPLE_FRAMEWORK CACHE FILEPATH "Path to Ogre Example Framework, usually in Ogre SDK." )
+set(CCS_PATH_TO_OGRE_EXAMPLE_FRAMEWORK CACHE FILEPATH "Path to Ogre Example Framework, usually in Ogre SDK.")
 
-FIND_PACKAGE(OIS)
+find_package(OIS)
 
-IF(OIS_FOUND)
-    SET( CCS_DEMO_INCLUDES ${CCS_DEMO_INCLUDES} ${OIS_INCLUDE_DIRS} )
-ENDIF(OIS_FOUND)
+if(OIS_FOUND)
+    set(CCS_DEMO_INCLUDES ${CCS_DEMO_INCLUDES} ${OIS_INCLUDE_DIRS})
+endif(OIS_FOUND)
 
-SET( CCS_DEMO_INCLUDES ${CCS_DEMO_INCLUDES} ${CCS_PATH_TO_OGRE_EXAMPLE_FRAMEWORK} "../CameraControlSystem/include/" )
+set(CCS_DEMO_INCLUDES ${CCS_DEMO_INCLUDES} ${CCS_PATH_TO_OGRE_EXAMPLE_FRAMEWORK} "../CameraControlSystem/include/")
 
-MARK_AS_ADVANCED(
-    CCS_PATH_TO_OGRE_EXAMPLE_FRAMEWORK
-    CCS_DEMO_INCLUDES
+mark_as_advanced(CCS_PATH_TO_OGRE_EXAMPLE_FRAMEWORK CCS_DEMO_INCLUDES)
+
+include_directories(${CCS_DEMO_INCLUDES})
+link_directories(../CameraControlSystem/ ${CCS_PATH_TO_LIBRARIES})
+
+set(SOURCES
+    ./src/main.cpp
 )
 
-include_directories( ${CCS_DEMO_INCLUDES} )
-
-link_directories( ../CameraControlSystem/ ${CCS_PATH_TO_LIBRARIES} )
-
-add_executable( CameraControlSystemSDKDemo${SUFF} src/DummyCameraMode.h src/main.cpp )
-
-target_link_libraries( CameraControlSystemSDKDemo${SUFF} CCS${SUFF}  ${OIS_LIBRARIES} ${OGRE_LIBRARIES} )
+add_executable(CameraControlSystemSDKDemo${SUFF} ${SOURCES})
+target_link_libraries(CameraControlSystemSDKDemo${SUFF} CCS${SUFF} ${OIS_LIBRARIES} ${OGRE_LIBRARIES})