[2626] | 1 | # |
---|
| 2 | # ORXONOX - the hottest 3D action shooter ever to exist |
---|
| 3 | # > www.orxonox.net < |
---|
| 4 | # |
---|
| 5 | # This program is free software; you can redistribute it and/or |
---|
| 6 | # modify it under the terms of the GNU General Public License |
---|
| 7 | # as published by the Free Software Foundation; either version 2 |
---|
| 8 | # of the License, or (at your option) any later version. |
---|
| 9 | # |
---|
| 10 | # This program is distributed in the hope that it will be useful, |
---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 13 | # GNU General Public License for more details. |
---|
| 14 | # |
---|
| 15 | # You should have received a copy of the GNU General Public License along |
---|
| 16 | # with this program; if not, write to the Free Software Foundation, |
---|
| 17 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
| 18 | # |
---|
| 19 | |
---|
| 20 | ################ Various Options ################ |
---|
| 21 | |
---|
[2621] | 22 | # various macro includes |
---|
| 23 | INCLUDE(FlagUtilities) |
---|
[2634] | 24 | INCLUDE(GenerateToluaBindings) |
---|
| 25 | INCLUDE(InstallUtilities) |
---|
[2621] | 26 | INCLUDE(SourceFileUtilities) |
---|
| 27 | |
---|
| 28 | # Use TinyXML++ |
---|
| 29 | ADD_COMPILER_FLAGS("-DTIXML_USE_TICPP") |
---|
| 30 | # OIS dynamic linking requires macro definition, at least for Windows |
---|
| 31 | ADD_COMPILER_FLAGS("-DOIS_DYNAMIC_LIB") |
---|
[2625] | 32 | # Tolua binding speedup if required |
---|
[2621] | 33 | ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" Release MinSizeRel TOLUA_PARSER_RELEASE) |
---|
| 34 | |
---|
[2619] | 35 | ################ OrxonoxConfig.h ################ |
---|
| 36 | |
---|
| 37 | # Copy and configure OrxonoxConfig which gets included in every file |
---|
| 38 | CONFIGURE_FILE(OrxonoxConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/OrxonoxConfig.h) |
---|
| 39 | |
---|
[2621] | 40 | |
---|
| 41 | ############## Include Directories ############## |
---|
| 42 | |
---|
[2509] | 43 | # Set the search paths for include files |
---|
| 44 | INCLUDE_DIRECTORIES( |
---|
[2621] | 45 | # External |
---|
[2509] | 46 | ${OGRE_INCLUDE_DIR} |
---|
| 47 | ${CEGUI_INCLUDE_DIR} |
---|
[2583] | 48 | ${ENET_INCLUDE_DIR} |
---|
[2509] | 49 | ${Boost_INCLUDE_DIRS} |
---|
[2630] | 50 | ${OPENAL_INCLUDE_DIRS} |
---|
[2509] | 51 | ${ALUT_INCLUDE_DIR} |
---|
| 52 | ${VORBIS_INCLUDE_DIR} |
---|
| 53 | ${OGG_INCLUDE_DIR} |
---|
| 54 | ${LUA_INCLUDE_DIR} |
---|
| 55 | ${TCL_INCLUDE_PATH} |
---|
[2621] | 56 | ${DIRECTX_INCLUDE_DIR} |
---|
[2509] | 57 | ${ZLIB_INCLUDE_DIR} |
---|
[1505] | 58 | |
---|
[2621] | 59 | # Internal |
---|
[2509] | 60 | . |
---|
| 61 | orxonox |
---|
[2621] | 62 | # Required for tolua bind and config files that are in the binary folder |
---|
[2509] | 63 | ${CMAKE_CURRENT_BINARY_DIR} |
---|
[2567] | 64 | ${CMAKE_CURRENT_BINARY_DIR}/orxonox |
---|
[2509] | 65 | ) |
---|
| 66 | |
---|
| 67 | |
---|
[2621] | 68 | ################ Sub Directories ################ |
---|
[2583] | 69 | |
---|
[2621] | 70 | # Third party libraries |
---|
[2610] | 71 | ADD_SUBDIRECTORY(tolua) |
---|
[2621] | 72 | |
---|
| 73 | # Include CEGUILua if not requested otherwise |
---|
| 74 | IF(CEGUILUA_USE_INTERNAL_LIBRARY) |
---|
| 75 | IF(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ceguilua/ceguilua-${CEGUI_VERSION}) |
---|
| 76 | MESSAGE(FATAL_ERROR "CEGUILua version not found in src folder. Update list of supported versions in LibraryConfig.cmake!") |
---|
[2624] | 77 | ENDIF() |
---|
[2621] | 78 | |
---|
| 79 | INCLUDE_DIRECTORIES(ceguilua/ceguilua-${CEGUI_VERSION}) |
---|
| 80 | ADD_SUBDIRECTORY(ceguilua) |
---|
[2624] | 81 | ENDIF() |
---|
[2621] | 82 | |
---|
[1505] | 83 | ADD_SUBDIRECTORY(cpptcl) |
---|
[2569] | 84 | ADD_SUBDIRECTORY(ogreceguirenderer) |
---|
[1505] | 85 | ADD_SUBDIRECTORY(ois) |
---|
| 86 | ADD_SUBDIRECTORY(tinyxml) |
---|
| 87 | |
---|
[2621] | 88 | # Orxonox code |
---|
[1505] | 89 | ADD_SUBDIRECTORY(util) |
---|
| 90 | ADD_SUBDIRECTORY(core) |
---|
[2621] | 91 | ADD_SUBDIRECTORY(audio) |
---|
[1505] | 92 | ADD_SUBDIRECTORY(network) |
---|
| 93 | ADD_SUBDIRECTORY(orxonox) |
---|