zibbr

Random 3d and p2p stuff that was originally the beginnings of an overly ambitious p2p virtual world thingy
git clone https://code.literati.org/zibbr.git
Log | Files | Refs

CMakeLists.txt (1718B)


      1 cmake_minimum_required(VERSION 2.6)
      2 project(Hardwar)
      3 cmake_policy(SET CMP0003 NEW)
      4 
      5 SET(Required_Packages
      6    OGRE
      7 )
      8 
      9 # project version
     10 SET( ${PROJECT_NAME}_MAJOR_VERSION 0 )
     11 SET( ${PROJECT_NAME}_MINOR_VERSION 1 )
     12 SET( ${PROJECT_NAME}_PATCH_LEVEL 0 )
     13 
     14 SET( CMAKE_MODULE_PATH   "${CMAKE_MODULE_PATH}"
     15                          "${Hardwar_SOURCE_DIR}/cmake/modules"
     16                          "${Hardwar_SOURCE_DIR}/cmake/scripts"
     17  )
     18 
     19 SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
     20 SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
     21 
     22 # Set compiler specific build flags
     23 if (CMAKE_COMPILER_IS_GNUCXX)
     24   add_definitions(-msse -Wunused -g3 -O3 -Wall)
     25 endif ()
     26 if (MSVC)
     27   add_definitions(/fp:fast)
     28 endif ()
     29 
     30 IF (MSVC_IDE)
     31 	IF (EXISTS $ENV{OGRE_HOME})
     32 		SET(OGRESDK $ENV{OGRE_HOME})
     33 		STRING(REGEX REPLACE "[\\]" "/" OGRESDK "${OGRESDK}")
     34 		MESSAGE(STATUS "Adding Additional Link Directories")
     35 		LINK_DIRECTORIES(${OGRESDK}/lib)
     36 	ENDIF(EXISTS $ENV{OGRE_HOME})
     37 
     38 	SET(PLATFORM_C_FLAGS "/W3 /MD /Od /D \"WIN32\" /D \"_WINDOWS\" /D \"TIXML_USE_STL\" /D \"ENET_DLL\" /Gm /Gy /fp:fast /ZI /EHsc")
     39 	SET(PLATFORM_C_FLAGS_DEBUG "/W3 /MDd /Od /Gm /Gy /fp:fast /ZI")
     40 
     41 	SET(CMAKE_CXX_FLAGS "${PLATFORM_C_FLAGS}")
     42 	SET(CMAKE_CXX_FLAGS_RELEASE "${PLATFORM_C_FLAGS}")
     43 	SET(CMAKE_CXX_FLAGS_DEBUG "${PLATFORM_C_FLAGS_DEBUG}")
     44 ENDIF (MSVC_IDE)
     45 
     46 #this foreach loads all of the packages that you specified as required.
     47 FOREACH(Package ${Required_Packages})
     48   FIND_PACKAGE(${Package} REQUIRED)
     49   IF (${Package}_FOUND)
     50       INCLUDE_DIRECTORIES(${${Package}_INCLUDE_DIR})
     51   ELSE (${Package}_FOUND)
     52       MESSAGE(STATUS "${Package} not found")
     53   ENDIF(${Package}_FOUND)
     54 ENDFOREACH(Package)
     55 
     56 ADD_EXECUTABLE(zibbr-test zibbr-test.c)
     57