2011-08-31 21:20:17 +00:00
|
|
|
# OpenClonk, http://www.openclonk.org
|
|
|
|
#
|
|
|
|
# Copyright (c) 2009-2011 Günther Brammer
|
|
|
|
# Copyright (c) 2009-2011 Nicolas Hake
|
|
|
|
# Copyright (c) 2009 David Dormagen
|
|
|
|
# Copyright (c) 2009-2011 Armin Burgmeier
|
|
|
|
# Copyright (c) 2009-2010 Sven Eberhardt
|
|
|
|
# Copyright (c) 2009 Tobias Zwick
|
|
|
|
# Copyright (c) 2009 Richard Gerum
|
2011-09-01 10:47:54 +00:00
|
|
|
# Copyright (c) 2010-2011 Julius Michaelis
|
2011-08-31 21:20:17 +00:00
|
|
|
# Copyright (c) 2010-2011 Peter Wortmann
|
|
|
|
# Copyright (c) 2010-2011 Martin Plicht
|
|
|
|
# Copyright (c) 2010 Manuel Riecke
|
|
|
|
#
|
|
|
|
# Portions might be copyrighted by other authors who have contributed
|
|
|
|
# to OpenClonk.
|
|
|
|
#
|
|
|
|
# Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
# purpose with or without fee is hereby granted, provided that the above
|
|
|
|
# copyright notice and this permission notice appear in all copies.
|
|
|
|
# See isc_license.txt for full license and disclaimer.
|
|
|
|
#
|
|
|
|
# "Clonk" is a registered trademark of Matthes Bender.
|
|
|
|
# See clonk_trademark_license.txt for full license.
|
2010-08-01 13:49:51 +00:00
|
|
|
|
2010-04-19 16:29:58 +00:00
|
|
|
cmake_minimum_required (VERSION 2.6.0)
|
2009-05-29 20:53:15 +00:00
|
|
|
project (clonk CXX C)
|
|
|
|
|
2010-08-01 13:49:51 +00:00
|
|
|
include(Version.txt)
|
|
|
|
|
2009-08-13 16:09:00 +00:00
|
|
|
set(CMAKE_ADDITIONAL_DEPS_PATH deps CACHE PATH "Additional directory to search for libraries and headers")
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_ADDITIONAL_DEPS_PATH})
|
2009-07-12 16:46:54 +00:00
|
|
|
set(OC_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
|
|
|
separate_arguments(OC_CXX_FLAGS)
|
|
|
|
set(OC_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
|
|
|
separate_arguments(OC_CXX_FLAGS_DEBUG)
|
2011-08-19 13:50:40 +00:00
|
|
|
set(OC_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG})
|
|
|
|
separate_arguments(OC_EXE_LINKER_FLAGS_DEBUG)
|
2009-07-01 20:25:45 +00:00
|
|
|
|
2010-01-12 21:09:16 +00:00
|
|
|
############################################################################
|
|
|
|
# User selectable options
|
|
|
|
############################################################################
|
|
|
|
option(PROJECT_FOLDERS "Put source files into subfolders in project file" ON)
|
|
|
|
option(USE_GL "Enable OpenGL support" ON)
|
2010-12-27 03:49:02 +00:00
|
|
|
SET(INITIAL_USE_SDL_MAINLOOP_VALUE OFF)
|
|
|
|
SET(INITIAL_USE_OPEN_AL OFF)
|
2010-01-12 21:09:16 +00:00
|
|
|
option(USE_SDL_MAINLOOP "Use SDL to create windows etc." ${INITIAL_USE_SDL_MAINLOOP_VALUE})
|
|
|
|
if(WIN32)
|
|
|
|
option(USE_DIRECTX "Enable DirectX support" ON)
|
|
|
|
if(EXISTS $ENV{DXSDK_DIR})
|
2010-04-18 20:46:29 +00:00
|
|
|
list(APPEND CMAKE_INCLUDE_PATH $ENV{DXSDK_DIR}/Include)
|
2010-02-28 00:42:57 +00:00
|
|
|
if(CMAKE_CL_64)
|
2010-01-12 21:09:16 +00:00
|
|
|
list(APPEND CMAKE_LIBRARY_PATH $ENV{DXSDK_DIR}/Lib/x64)
|
|
|
|
else()
|
|
|
|
list(APPEND CMAKE_LIBRARY_PATH $ENV{DXSDK_DIR}/Lib/x86)
|
|
|
|
endif()
|
2010-04-18 20:02:01 +00:00
|
|
|
else()
|
|
|
|
|
2010-01-12 21:09:16 +00:00
|
|
|
endif()
|
2011-01-02 00:20:52 +00:00
|
|
|
|
|
|
|
option(GENERATE_MINI_DUMP "Generate a minidump on crash" ON)
|
2010-01-12 21:09:16 +00:00
|
|
|
else()
|
|
|
|
SET(USE_DIRECTX OFF)
|
|
|
|
SET(HAVE_FMOD OFF)
|
2011-01-02 00:20:52 +00:00
|
|
|
SET(GENERATE_MINI_DUMP OFF)
|
2010-01-12 21:09:16 +00:00
|
|
|
endif()
|
2011-01-25 17:56:40 +00:00
|
|
|
if(NOT USE_GL AND NOT USE_DIRECTX)
|
|
|
|
message(STATUS "No graphics display enabled; building dedicated server")
|
|
|
|
SET(USE_CONSOLE ON CACHE INTERNAL "Build dedicated server")
|
|
|
|
endif()
|
|
|
|
if(UNIX AND NOT USE_SDL_MAINLOOP AND NOT APPLE AND NOT USE_CONSOLE)
|
2010-01-12 21:09:16 +00:00
|
|
|
option(USE_X11 "Use X11 to create windows etc." ON)
|
|
|
|
option(USE_GTK "Use GTK for the developer mode" ON)
|
2010-09-22 15:11:19 +00:00
|
|
|
option(USE_GTK3 "Use GTK3 instead of GTK2" OFF)
|
2010-01-12 21:09:16 +00:00
|
|
|
else()
|
|
|
|
SET(USE_X11 OFF)
|
|
|
|
SET(USE_GTK OFF)
|
2010-09-22 15:11:19 +00:00
|
|
|
SET(USE_GTK3 OFF)
|
2010-01-12 21:09:16 +00:00
|
|
|
endif()
|
2010-12-27 03:49:02 +00:00
|
|
|
if(APPLE)
|
|
|
|
option(USE_COCOA "Use Apple Cocoa for the developer mode and the windows." ON)
|
|
|
|
SET(INITIAL_USE_OPEN_AL ON)
|
|
|
|
else()
|
|
|
|
option(USE_COCOA OFF)
|
|
|
|
endif()
|
|
|
|
option(USE_OPEN_AL "Use OpenAL to play sounds" ${INITIAL_USE_OPEN_AL})
|
2010-02-08 20:51:48 +00:00
|
|
|
option(BUILD_TO_PLANET "Put build files to ./planet/" OFF)
|
2010-03-21 21:40:37 +00:00
|
|
|
option(DEBUGREC "Debug records" OFF)
|
2010-04-18 18:10:24 +00:00
|
|
|
option(OC_BUILD_MULTIPROCESSOR "Use all processor cores to build" OFF)
|
2010-12-26 20:39:52 +00:00
|
|
|
option(WITH_AUTOMATIC_UPDATE "Build engine without automatic update support" ON)
|
2010-01-12 21:09:16 +00:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# Check for compiler quirks and features
|
|
|
|
############################################################################
|
|
|
|
include(CheckCXXCompilerFlag)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
2010-09-04 18:01:43 +00:00
|
|
|
CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" USE_GCC_STD_0X)
|
2010-01-12 21:09:16 +00:00
|
|
|
if(USE_GCC_STD_0X)
|
2010-09-04 18:01:43 +00:00
|
|
|
list(APPEND OC_CXX_FLAGS "-std=gnu++0x")
|
2010-01-12 21:09:16 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# ck 09-09-20: CMAKE_REQUIRED_FLAGS requires a string, not a list.
|
|
|
|
include(CheckCXXSourceCompiles)
|
|
|
|
foreach(FLAG ${OC_CXX_FLAGS})
|
|
|
|
set(OC_REQUIRED_FLAGS "${OC_REQUIRED_FLAGS} ${FLAG}")
|
|
|
|
endforeach()
|
2010-09-04 10:48:17 +00:00
|
|
|
|
|
|
|
# ck 10-09-04: Reset CMAKE_REQUIRED_FLAGS after having done the C++0x checks
|
|
|
|
# otherwise they are used for C library checks as well and the C compiler bails
|
2010-09-04 18:01:43 +00:00
|
|
|
# out because it does not understand -std=gnu++0x
|
2010-09-04 10:48:17 +00:00
|
|
|
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
2010-01-12 21:09:16 +00:00
|
|
|
set(CMAKE_REQUIRED_FLAGS ${OC_REQUIRED_FLAGS})
|
|
|
|
CHECK_CXX_SOURCE_COMPILES("void f(struct D&&); int main() { return 0; }" HAVE_RVALUE_REF)
|
2010-01-24 01:48:55 +00:00
|
|
|
CHECK_CXX_SOURCE_COMPILES("int main() { void *d = nullptr; }" HAVE_NULLPTR)
|
2011-03-10 21:49:33 +00:00
|
|
|
CHECK_CXX_SOURCE_COMPILES("int main() { static_assert(true, \"\"); }" HAVE_STATIC_ASSERT)
|
2010-09-04 10:48:17 +00:00
|
|
|
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
|
2010-01-12 21:09:16 +00:00
|
|
|
|
|
|
|
if(MSVC_VERSION GREATER 1499)
|
|
|
|
# Activate minimal rebuild
|
2010-04-18 18:10:24 +00:00
|
|
|
if(OC_BUILD_MULTIPROCESSOR)
|
|
|
|
list(APPEND OC_CXX_FLAGS /MP)
|
2010-09-29 21:08:08 +00:00
|
|
|
list(REMOVE_ITEM OC_CXX_FLAGS_DEBUG /Gm)
|
2010-04-18 18:10:24 +00:00
|
|
|
else()
|
2010-09-29 21:08:08 +00:00
|
|
|
list(REMOVE_ITEM OC_CXX_FLAGS /MP)
|
2010-04-18 18:10:24 +00:00
|
|
|
list(APPEND OC_CXX_FLAGS_DEBUG /Gm)
|
|
|
|
endif()
|
2010-02-28 00:42:57 +00:00
|
|
|
if (NOT CMAKE_CL_64)
|
2010-01-12 21:09:16 +00:00
|
|
|
# Activate edit-and-continue
|
|
|
|
list(REMOVE_ITEM OC_CXX_FLAGS_DEBUG /Zi)
|
|
|
|
list(APPEND OC_CXX_FLAGS_DEBUG /ZI /Gy)
|
|
|
|
endif()
|
2011-08-19 13:50:40 +00:00
|
|
|
# do not link the release CRT in debug builds
|
|
|
|
list(APPEND OC_EXE_LINKER_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT")
|
2010-01-12 21:09:16 +00:00
|
|
|
set(HAVE_PRECOMPILED_HEADERS ON CACHE INTERNAL "Compiler supports precompiled headers")
|
|
|
|
endif()
|
|
|
|
if(MSVC_VERSION)
|
|
|
|
# Suppress warnings about "non-secure" functions
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS)
|
|
|
|
# Disable warning C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
|
|
|
list(APPEND OC_CXX_FLAGS "/wd4244")
|
2010-09-29 21:11:12 +00:00
|
|
|
# Disable warning C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data (64 bit build only)
|
|
|
|
list(APPEND OC_CXX_FLAGS "/wd4267")
|
2010-01-12 21:09:16 +00:00
|
|
|
endif()
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
############################################################################
|
|
|
|
# List target source files. Don't directly create a target since we condi-
|
|
|
|
# tionally add more sources depending on configuration options later.
|
|
|
|
############################################################################
|
|
|
|
# OC_CLONK_SOURCES: Sources for OpenClonk that are needed by every build.
|
|
|
|
# OC_SYSTEM_SOURCES: Sources for OpenClonk that are only needed by specific
|
|
|
|
# configurations.
|
2009-08-12 13:01:14 +00:00
|
|
|
set(OC_CLONK_SOURCES
|
|
|
|
src/C4Application.cpp
|
|
|
|
src/C4Application.h
|
|
|
|
src/C4FullScreen.cpp
|
|
|
|
src/C4FullScreen.h
|
|
|
|
src/C4Game.cpp
|
|
|
|
src/C4Game.h
|
2009-11-25 15:04:32 +00:00
|
|
|
src/C4Globals.cpp
|
2009-08-12 13:01:14 +00:00
|
|
|
src/C4GraphicsSystem.cpp
|
|
|
|
src/C4GraphicsSystem.h
|
|
|
|
src/c4group/C4Components.h
|
2009-08-13 23:46:32 +00:00
|
|
|
src/c4group/C4ComponentHost.cpp
|
|
|
|
src/c4group/C4ComponentHost.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/c4group/C4Extra.cpp
|
|
|
|
src/c4group/C4Extra.h
|
|
|
|
src/c4group/C4Group.cpp
|
|
|
|
src/c4group/C4Group.h
|
|
|
|
src/c4group/C4GroupSet.cpp
|
|
|
|
src/c4group/C4GroupSet.h
|
2009-08-13 23:46:32 +00:00
|
|
|
src/c4group/C4LangStringTable.cpp
|
|
|
|
src/c4group/C4LangStringTable.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/c4group/C4Language.cpp
|
|
|
|
src/c4group/C4Language.h
|
|
|
|
src/c4group/C4Update.cpp
|
|
|
|
src/c4group/C4Update.h
|
|
|
|
src/c4group/CStdFile.cpp
|
|
|
|
src/c4group/CStdFile.h
|
|
|
|
src/C4Include.h
|
|
|
|
src/C4Prototypes.h
|
|
|
|
src/C4Version.h
|
|
|
|
src/config/C4Config.cpp
|
|
|
|
src/config/C4Config.h
|
|
|
|
src/config/C4ConfigShareware.cpp
|
|
|
|
src/config/C4ConfigShareware.h
|
2009-08-12 20:03:50 +00:00
|
|
|
src/config/C4Constants.h
|
2011-01-06 20:18:13 +00:00
|
|
|
src/config/C4Reloc.cpp
|
|
|
|
src/config/C4Reloc.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/config/C4SecurityCertificates.cpp
|
|
|
|
src/config/C4SecurityCertificates.h
|
|
|
|
src/control/C4Control.cpp
|
|
|
|
src/control/C4Control.h
|
|
|
|
src/control/C4GameControl.cpp
|
|
|
|
src/control/C4GameControl.h
|
|
|
|
src/control/C4GameParameters.cpp
|
|
|
|
src/control/C4GameParameters.h
|
|
|
|
src/control/C4GameSave.cpp
|
|
|
|
src/control/C4GameSave.h
|
2009-08-12 15:27:43 +00:00
|
|
|
src/control/C4PlayerControl.cpp
|
|
|
|
src/control/C4PlayerControl.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/control/C4PlayerInfoConflicts.cpp
|
|
|
|
src/control/C4PlayerInfo.cpp
|
|
|
|
src/control/C4PlayerInfo.h
|
|
|
|
src/control/C4Record.cpp
|
|
|
|
src/control/C4Record.h
|
|
|
|
src/control/C4RoundResults.cpp
|
|
|
|
src/control/C4RoundResults.h
|
|
|
|
src/control/C4Teams.cpp
|
|
|
|
src/control/C4Teams.h
|
|
|
|
src/editor/C4Console.cpp
|
|
|
|
src/editor/C4Console.h
|
2010-12-11 18:50:38 +00:00
|
|
|
src/editor/C4ConsoleGUI.h
|
2010-12-13 02:11:06 +00:00
|
|
|
src/editor/C4ConsoleGUICommon.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/editor/C4DevmodeDlg.cpp
|
|
|
|
src/editor/C4DevmodeDlg.h
|
|
|
|
src/editor/C4EditCursor.cpp
|
|
|
|
src/editor/C4EditCursor.h
|
|
|
|
src/editor/C4ObjectListDlg.cpp
|
|
|
|
src/editor/C4ObjectListDlg.h
|
|
|
|
src/editor/C4ToolsDlg.cpp
|
|
|
|
src/editor/C4ToolsDlg.h
|
|
|
|
src/game/C4GameVersion.h
|
|
|
|
src/game/C4Physics.h
|
|
|
|
src/game/landscape/C4Landscape.cpp
|
|
|
|
src/game/landscape/C4Landscape.h
|
2011-05-23 23:12:19 +00:00
|
|
|
src/game/landscape/C4LandscapeRender.cpp
|
|
|
|
src/game/landscape/C4LandscapeRenderClassic.cpp
|
|
|
|
src/game/landscape/C4LandscapeRender.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/game/landscape/C4Map.cpp
|
|
|
|
src/game/landscape/C4MapCreatorS2.cpp
|
|
|
|
src/game/landscape/C4MapCreatorS2.h
|
|
|
|
src/game/landscape/C4Map.h
|
|
|
|
src/game/landscape/C4MassMover.cpp
|
|
|
|
src/game/landscape/C4MassMover.h
|
|
|
|
src/game/landscape/C4Material.cpp
|
|
|
|
src/game/landscape/C4Material.h
|
|
|
|
src/game/landscape/C4MaterialList.cpp
|
|
|
|
src/game/landscape/C4MaterialList.h
|
|
|
|
src/game/landscape/C4Particles.cpp
|
|
|
|
src/game/landscape/C4Particles.h
|
|
|
|
src/game/landscape/C4PathFinder.cpp
|
|
|
|
src/game/landscape/C4PathFinder.h
|
|
|
|
src/game/landscape/C4PXS.cpp
|
|
|
|
src/game/landscape/C4PXS.h
|
|
|
|
src/game/landscape/C4Region.cpp
|
|
|
|
src/game/landscape/C4Region.h
|
|
|
|
src/game/landscape/C4Scenario.cpp
|
|
|
|
src/game/landscape/C4Scenario.h
|
|
|
|
src/game/landscape/C4Sky.cpp
|
|
|
|
src/game/landscape/C4Sky.h
|
|
|
|
src/game/landscape/C4SolidMask.cpp
|
|
|
|
src/game/landscape/C4SolidMask.h
|
|
|
|
src/game/landscape/C4Texture.cpp
|
|
|
|
src/game/landscape/C4Texture.h
|
|
|
|
src/game/landscape/C4Weather.cpp
|
|
|
|
src/game/landscape/C4Weather.h
|
|
|
|
src/game/object/C4Action.cpp
|
|
|
|
src/game/object/C4Command.cpp
|
|
|
|
src/game/object/C4Command.h
|
|
|
|
src/game/object/C4Def.cpp
|
|
|
|
src/game/object/C4DefGraphics.cpp
|
|
|
|
src/game/object/C4DefGraphics.h
|
2011-03-03 16:10:22 +00:00
|
|
|
src/game/object/C4DefList.cpp
|
|
|
|
src/game/object/C4DefList.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/game/object/C4Def.h
|
|
|
|
src/game/object/C4GameObjects.cpp
|
|
|
|
src/game/object/C4GameObjects.h
|
|
|
|
src/game/object/C4Id.cpp
|
|
|
|
src/game/object/C4Id.h
|
|
|
|
src/game/object/C4IDList.cpp
|
|
|
|
src/game/object/C4IDList.h
|
|
|
|
src/game/object/C4InfoCore.cpp
|
|
|
|
src/game/object/C4InfoCore.h
|
2010-01-22 18:27:02 +00:00
|
|
|
src/game/object/C4MeshAnimation.cpp
|
|
|
|
src/game/object/C4MeshAnimation.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/game/object/C4Movement.cpp
|
|
|
|
src/game/object/C4ObjectCom.cpp
|
|
|
|
src/game/object/C4ObjectCom.h
|
|
|
|
src/game/object/C4Object.cpp
|
|
|
|
src/game/object/C4Object.h
|
|
|
|
src/game/object/C4ObjectInfo.cpp
|
|
|
|
src/game/object/C4ObjectInfo.h
|
|
|
|
src/game/object/C4ObjectInfoList.cpp
|
|
|
|
src/game/object/C4ObjectInfoList.h
|
|
|
|
src/game/object/C4ObjectList.cpp
|
|
|
|
src/game/object/C4ObjectList.h
|
|
|
|
src/game/object/C4ObjectMenu.cpp
|
|
|
|
src/game/object/C4ObjectMenu.h
|
2011-01-20 00:56:01 +00:00
|
|
|
src/game/object/C4ObjectScript.cpp
|
2010-03-30 21:08:15 +00:00
|
|
|
src/game/object/C4ObjectPtr.cpp
|
|
|
|
src/game/object/C4ObjectPtr.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/game/object/C4Sector.cpp
|
|
|
|
src/game/object/C4Sector.h
|
|
|
|
src/game/object/C4Shape.cpp
|
|
|
|
src/game/object/C4Shape.h
|
|
|
|
src/game/player/C4Player.cpp
|
|
|
|
src/game/player/C4Player.h
|
|
|
|
src/game/player/C4PlayerList.cpp
|
|
|
|
src/game/player/C4PlayerList.h
|
|
|
|
src/game/player/C4RankSystem.cpp
|
|
|
|
src/game/player/C4RankSystem.h
|
|
|
|
src/game/script/C4Effect.cpp
|
|
|
|
src/game/script/C4Effects.h
|
|
|
|
src/game/script/C4FindObject.cpp
|
|
|
|
src/game/script/C4FindObject.h
|
2011-03-04 12:49:41 +00:00
|
|
|
src/game/script/C4GameScript.cpp
|
2009-08-12 13:01:14 +00:00
|
|
|
src/game/script/C4Script.h
|
|
|
|
src/game/script/C4TransferZone.cpp
|
|
|
|
src/game/script/C4TransferZone.h
|
|
|
|
src/gui/C4ChatDlg.cpp
|
|
|
|
src/gui/C4ChatDlg.h
|
|
|
|
src/gui/C4DownloadDlg.cpp
|
|
|
|
src/gui/C4DownloadDlg.h
|
|
|
|
src/gui/C4FileSelDlg.cpp
|
|
|
|
src/gui/C4FileSelDlg.h
|
|
|
|
src/gui/C4Folder.cpp
|
|
|
|
src/gui/C4Folder.h
|
|
|
|
src/gui/C4GameDialogs.cpp
|
|
|
|
src/gui/C4GameDialogs.h
|
|
|
|
src/gui/C4GameLobby.cpp
|
|
|
|
src/gui/C4GameLobby.h
|
|
|
|
src/gui/C4GameMessage.cpp
|
|
|
|
src/gui/C4GameMessage.h
|
|
|
|
src/gui/C4GameOptions.cpp
|
|
|
|
src/gui/C4GameOptions.h
|
|
|
|
src/gui/C4GameOverDlg.cpp
|
|
|
|
src/gui/C4GameOverDlg.h
|
|
|
|
src/gui/C4GuiButton.cpp
|
|
|
|
src/gui/C4GuiCheckBox.cpp
|
|
|
|
src/gui/C4GuiComboBox.cpp
|
|
|
|
src/gui/C4GuiContainers.cpp
|
|
|
|
src/gui/C4Gui.cpp
|
|
|
|
src/gui/C4GuiDialogs.cpp
|
|
|
|
src/gui/C4GuiEdit.cpp
|
|
|
|
src/gui/C4Gui.h
|
|
|
|
src/gui/C4GuiLabels.cpp
|
|
|
|
src/gui/C4GuiListBox.cpp
|
|
|
|
src/gui/C4GuiMenu.cpp
|
|
|
|
src/gui/C4GuiTabular.cpp
|
|
|
|
src/gui/C4KeyboardInput.cpp
|
|
|
|
src/gui/C4KeyboardInput.h
|
|
|
|
src/gui/C4LoaderScreen.cpp
|
|
|
|
src/gui/C4LoaderScreen.h
|
|
|
|
src/gui/C4MainMenu.cpp
|
|
|
|
src/gui/C4MainMenu.h
|
|
|
|
src/gui/C4Menu.cpp
|
|
|
|
src/gui/C4Menu.h
|
|
|
|
src/gui/C4MessageBoard.cpp
|
|
|
|
src/gui/C4MessageBoard.h
|
|
|
|
src/gui/C4MessageInput.cpp
|
|
|
|
src/gui/C4MessageInput.h
|
|
|
|
src/gui/C4MouseControl.cpp
|
|
|
|
src/gui/C4MouseControl.h
|
|
|
|
src/gui/C4PlayerInfoListBox.cpp
|
|
|
|
src/gui/C4PlayerInfoListBox.h
|
|
|
|
src/gui/C4Scoreboard.cpp
|
|
|
|
src/gui/C4Scoreboard.h
|
|
|
|
src/gui/C4StartupAboutDlg.cpp
|
|
|
|
src/gui/C4StartupAboutDlg.h
|
|
|
|
src/gui/C4Startup.cpp
|
|
|
|
src/gui/C4Startup.h
|
|
|
|
src/gui/C4StartupMainDlg.cpp
|
|
|
|
src/gui/C4StartupMainDlg.h
|
|
|
|
src/gui/C4StartupNetDlg.cpp
|
|
|
|
src/gui/C4StartupNetDlg.h
|
|
|
|
src/gui/C4StartupOptionsDlg.cpp
|
|
|
|
src/gui/C4StartupOptionsDlg.h
|
|
|
|
src/gui/C4StartupPlrSelDlg.cpp
|
|
|
|
src/gui/C4StartupPlrSelDlg.h
|
|
|
|
src/gui/C4StartupScenSelDlg.cpp
|
|
|
|
src/gui/C4StartupScenSelDlg.h
|
|
|
|
src/gui/C4UpdateDlg.cpp
|
|
|
|
src/gui/C4UpdateDlg.h
|
|
|
|
src/gui/C4UpperBoard.cpp
|
|
|
|
src/gui/C4UpperBoard.h
|
|
|
|
src/gui/C4UserMessages.h
|
|
|
|
src/gui/C4Viewport.cpp
|
|
|
|
src/gui/C4Viewport.h
|
|
|
|
src/lib/C4InputValidation.cpp
|
|
|
|
src/lib/C4InputValidation.h
|
|
|
|
src/lib/C4LogBuf.cpp
|
|
|
|
src/lib/C4LogBuf.h
|
|
|
|
src/lib/C4Log.cpp
|
|
|
|
src/lib/C4Log.h
|
|
|
|
src/lib/C4NameList.cpp
|
|
|
|
src/lib/C4NameList.h
|
|
|
|
src/lib/C4Random.cpp
|
|
|
|
src/lib/C4Random.h
|
2010-05-04 15:35:18 +00:00
|
|
|
src/lib/C4Real.cpp
|
|
|
|
src/lib/C4Real.h
|
2009-08-13 23:46:32 +00:00
|
|
|
src/lib/C4Rect.cpp
|
|
|
|
src/lib/C4Rect.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/lib/C4RTF.cpp
|
2009-12-30 19:42:31 +00:00
|
|
|
src/lib/C4RTF.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/lib/C4Stat.cpp
|
|
|
|
src/lib/C4Stat.h
|
|
|
|
src/lib/PathFinder.cpp
|
|
|
|
src/lib/PathFinder.h
|
|
|
|
src/lib/Standard.cpp
|
|
|
|
src/lib/Standard.h
|
|
|
|
src/lib/StdAdaptors.h
|
|
|
|
src/lib/StdBase64.cpp
|
|
|
|
src/lib/StdBase64.h
|
|
|
|
src/lib/StdBuf.cpp
|
|
|
|
src/lib/StdBuf.h
|
|
|
|
src/lib/StdColors.h
|
|
|
|
src/lib/StdCompiler.cpp
|
|
|
|
src/lib/StdCompiler.h
|
|
|
|
src/lib/StdMarkup.cpp
|
|
|
|
src/lib/StdMarkup.h
|
2011-01-19 21:55:18 +00:00
|
|
|
src/lib/StdMesh.cpp
|
|
|
|
src/lib/StdMesh.h
|
|
|
|
src/lib/StdMeshLoader.h
|
|
|
|
src/lib/StdMeshLoaderBinary.cpp
|
|
|
|
src/lib/StdMeshLoaderBinaryChunks.cpp
|
|
|
|
src/lib/StdMeshLoaderBinaryChunks.h
|
|
|
|
src/lib/StdMeshLoaderDataStream.h
|
|
|
|
src/lib/StdMeshLoaderXml.cpp
|
|
|
|
src/lib/StdMeshMaterial.cpp
|
|
|
|
src/lib/StdMeshMaterial.h
|
2011-08-17 21:50:33 +00:00
|
|
|
src/lib/StdMeshUpdate.cpp
|
|
|
|
src/lib/StdMeshUpdate.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/lib/StdResStr2.cpp
|
|
|
|
src/lib/StdResStr2.h
|
|
|
|
src/lib/StdResStr.h
|
|
|
|
src/lib/texture/C4Facet.cpp
|
|
|
|
src/lib/texture/C4FacetEx.cpp
|
|
|
|
src/lib/texture/C4FacetEx.h
|
|
|
|
src/lib/texture/C4Facet.h
|
|
|
|
src/lib/texture/C4GraphicsResource.cpp
|
|
|
|
src/lib/texture/C4GraphicsResource.h
|
|
|
|
src/lib/texture/C4Surface.cpp
|
|
|
|
src/lib/texture/C4Surface.h
|
|
|
|
src/lib/texture/StdPNG.cpp
|
|
|
|
src/lib/texture/StdPNG.h
|
|
|
|
src/network/C4Client.cpp
|
|
|
|
src/network/C4Client.h
|
|
|
|
src/network/C4GameControlNetwork.cpp
|
|
|
|
src/network/C4GameControlNetwork.h
|
|
|
|
src/network/C4InteractiveThread.cpp
|
|
|
|
src/network/C4InteractiveThread.h
|
|
|
|
src/network/C4League.cpp
|
|
|
|
src/network/C4League.h
|
|
|
|
src/network/C4NetIO.cpp
|
|
|
|
src/network/C4NetIO.h
|
|
|
|
src/network/C4Network2Client.cpp
|
|
|
|
src/network/C4Network2Client.h
|
|
|
|
src/network/C4Network2.cpp
|
|
|
|
src/network/C4Network2Dialogs.cpp
|
|
|
|
src/network/C4Network2Dialogs.h
|
|
|
|
src/network/C4Network2Discover.cpp
|
|
|
|
src/network/C4Network2Discover.h
|
|
|
|
src/network/C4Network2.h
|
|
|
|
src/network/C4Network2IO.cpp
|
|
|
|
src/network/C4Network2IO.h
|
|
|
|
src/network/C4Network2IRC.cpp
|
|
|
|
src/network/C4Network2IRC.h
|
|
|
|
src/network/C4Network2Players.cpp
|
|
|
|
src/network/C4Network2Players.h
|
|
|
|
src/network/C4Network2Reference.cpp
|
|
|
|
src/network/C4Network2Reference.h
|
|
|
|
src/network/C4Network2Res.cpp
|
|
|
|
src/network/C4Network2ResDlg.cpp
|
|
|
|
src/network/C4Network2Res.h
|
|
|
|
src/network/C4Network2Stats.cpp
|
|
|
|
src/network/C4Network2Stats.h
|
|
|
|
src/network/C4Packet2.cpp
|
|
|
|
src/network/C4PacketBase.h
|
|
|
|
src/platform/Bitmap256.cpp
|
|
|
|
src/platform/Bitmap256.h
|
|
|
|
src/platform/C4FileMonitor.cpp
|
|
|
|
src/platform/C4FileMonitor.h
|
|
|
|
src/platform/C4Fonts.cpp
|
|
|
|
src/platform/C4Fonts.h
|
|
|
|
src/platform/C4GamePadCon.cpp
|
|
|
|
src/platform/C4GamePadCon.h
|
|
|
|
src/platform/C4MusicFile.cpp
|
|
|
|
src/platform/C4MusicFile.h
|
|
|
|
src/platform/C4MusicSystem.cpp
|
|
|
|
src/platform/C4MusicSystem.h
|
|
|
|
src/platform/C4SoundSystem.cpp
|
|
|
|
src/platform/C4SoundSystem.h
|
2010-09-26 00:36:35 +00:00
|
|
|
src/platform/C4SoundLoaders.h
|
|
|
|
src/platform/C4SoundLoaders.cpp
|
2011-01-30 20:44:54 +00:00
|
|
|
src/platform/StdTApp.cpp
|
2009-08-12 13:01:14 +00:00
|
|
|
src/platform/C4Video.cpp
|
|
|
|
src/platform/C4Video.h
|
|
|
|
src/platform/C4VideoPlayback.cpp
|
|
|
|
src/platform/C4VideoPlayback.h
|
2010-09-28 19:29:00 +00:00
|
|
|
src/platform/C4ViewportWindow.cpp
|
|
|
|
src/platform/C4ViewportWindow.h
|
2011-03-13 14:48:45 +00:00
|
|
|
src/platform/C4windowswrapper.h
|
2011-03-13 16:25:35 +00:00
|
|
|
src/platform/GetTime.cpp
|
2010-03-08 22:59:11 +00:00
|
|
|
src/platform/PlatformAbstraction.h
|
2011-03-19 21:09:10 +00:00
|
|
|
src/platform/StdApp.h
|
|
|
|
src/platform/StdAppCommon.cpp
|
2009-08-12 13:01:14 +00:00
|
|
|
src/platform/StdD3D.cpp
|
|
|
|
src/platform/StdD3D.h
|
|
|
|
src/platform/StdD3DShader.cpp
|
|
|
|
src/platform/StdD3DShader.h
|
|
|
|
src/platform/StdDDraw2.cpp
|
|
|
|
src/platform/StdDDraw2.h
|
|
|
|
src/platform/StdFacet.h
|
|
|
|
src/platform/StdFile.cpp
|
|
|
|
src/platform/StdFile.h
|
|
|
|
src/platform/StdFont.cpp
|
|
|
|
src/platform/StdFont.h
|
|
|
|
src/platform/StdGL.cpp
|
|
|
|
src/platform/StdGLCtx.cpp
|
|
|
|
src/platform/StdGL.h
|
|
|
|
src/platform/StdNoGfx.cpp
|
|
|
|
src/platform/StdNoGfx.h
|
|
|
|
src/platform/StdRegistry.cpp
|
|
|
|
src/platform/StdRegistry.h
|
|
|
|
src/platform/StdScheduler.cpp
|
|
|
|
src/platform/StdScheduler.h
|
|
|
|
src/platform/StdSurface2.cpp
|
|
|
|
src/platform/StdSurface2.h
|
|
|
|
src/platform/StdSurface8.cpp
|
|
|
|
src/platform/StdSurface8.h
|
|
|
|
src/platform/StdSync.h
|
|
|
|
src/platform/StdVideo.cpp
|
|
|
|
src/platform/StdVideo.h
|
|
|
|
src/platform/StdWindow.h
|
|
|
|
src/script/C4Aul.cpp
|
2010-02-24 16:40:18 +00:00
|
|
|
src/script/C4AulExec.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/script/C4AulExec.cpp
|
2010-02-24 16:40:18 +00:00
|
|
|
src/script/C4AulDebug.h
|
|
|
|
src/script/C4AulDebug.cpp
|
2011-01-19 23:19:19 +00:00
|
|
|
src/script/C4AulDefFunc.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/script/C4Aul.h
|
|
|
|
src/script/C4AulLink.cpp
|
|
|
|
src/script/C4AulParse.cpp
|
|
|
|
src/script/C4PropList.cpp
|
|
|
|
src/script/C4PropList.h
|
2011-03-04 12:49:41 +00:00
|
|
|
src/script/C4Script.cpp
|
2009-08-12 13:01:14 +00:00
|
|
|
src/script/C4ScriptHost.cpp
|
|
|
|
src/script/C4ScriptHost.h
|
|
|
|
src/script/C4StringTable.cpp
|
|
|
|
src/script/C4StringTable.h
|
|
|
|
src/script/C4Value.cpp
|
|
|
|
src/script/C4Value.h
|
2010-12-27 16:05:35 +00:00
|
|
|
src/script/C4ValueArray.cpp
|
|
|
|
src/script/C4ValueArray.h
|
2009-08-12 13:01:14 +00:00
|
|
|
src/script/C4ValueMap.cpp
|
|
|
|
src/script/C4ValueMap.h
|
|
|
|
src/zlib/gzio.c
|
|
|
|
src/zlib/zutil.h
|
|
|
|
)
|
|
|
|
mark_as_advanced(OC_CLONK_SOURCES)
|
2009-08-12 20:44:09 +00:00
|
|
|
mark_as_advanced(OC_SYSTEM_SOURCES)
|
2009-08-12 13:01:14 +00:00
|
|
|
|
2009-05-29 21:05:50 +00:00
|
|
|
if(WIN32)
|
2009-08-12 13:01:14 +00:00
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
2009-08-10 15:59:18 +00:00
|
|
|
src/platform/StdWindow.cpp
|
|
|
|
src/platform/StdJoystick.cpp
|
|
|
|
src/platform/StdJoystick.h
|
2011-03-01 12:28:13 +00:00
|
|
|
src/platform/C4CrashHandlerWin32.cpp
|
2010-12-11 18:50:38 +00:00
|
|
|
src/editor/C4ConsoleWin32.cpp
|
2009-08-10 15:59:18 +00:00
|
|
|
src/res/resource.h
|
2009-05-29 21:05:50 +00:00
|
|
|
)
|
2010-02-20 21:25:57 +00:00
|
|
|
|
|
|
|
if(MINGW)
|
|
|
|
# cmake does not support compiling resources with MinGW
|
|
|
|
# natively, see http://www.cmake.org/Bug/view.php?id=4068.
|
|
|
|
# cross-compiler sets CMAKE_RC_COMPILER in toolchain file
|
|
|
|
if(NOT CMAKE_RC_COMPILER)
|
|
|
|
SET(CMAKE_RC_COMPILER windres)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/engine_rc.o
|
2010-08-05 19:01:04 +00:00
|
|
|
COMMAND ${CMAKE_RC_COMPILER} -I${CMAKE_CURRENT_BINARY_DIR}
|
2010-02-20 21:25:57 +00:00
|
|
|
-i${CMAKE_CURRENT_SOURCE_DIR}/src/res/engine.rc
|
2011-03-12 12:47:46 +00:00
|
|
|
-o ${CMAKE_CURRENT_BINARY_DIR}/engine_rc.o
|
|
|
|
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/res/engine.rc)
|
2010-02-20 21:25:57 +00:00
|
|
|
|
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/engine_rc.o
|
|
|
|
)
|
|
|
|
else(MINGW)
|
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
|
|
|
src/res/engine.rc
|
|
|
|
)
|
|
|
|
endif(MINGW)
|
2009-08-16 16:27:44 +00:00
|
|
|
elseif(USE_SDL_MAINLOOP)
|
2009-08-12 13:01:14 +00:00
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
2009-08-10 15:59:18 +00:00
|
|
|
src/platform/StdSDLApp.cpp
|
|
|
|
src/platform/StdSDLWindow.cpp
|
2009-05-29 21:05:50 +00:00
|
|
|
)
|
|
|
|
elseif(USE_X11)
|
2009-08-12 13:01:14 +00:00
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
2009-08-10 15:59:18 +00:00
|
|
|
src/platform/StdXApp.cpp
|
|
|
|
src/platform/StdXWindow.cpp
|
|
|
|
src/platform/StdXPrivate.h
|
|
|
|
)
|
|
|
|
endif()
|
2010-12-27 03:49:02 +00:00
|
|
|
|
|
|
|
if(NOT APPLE)
|
|
|
|
list(APPEND OC_SYSTEM_SOURCES src/C4WinMain.cpp)
|
|
|
|
endif()
|
|
|
|
|
2009-08-10 15:59:18 +00:00
|
|
|
if(APPLE)
|
2009-08-12 13:01:14 +00:00
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
2010-02-11 13:19:13 +00:00
|
|
|
src/platform/StdMacApp.mm
|
2010-09-30 05:20:03 +00:00
|
|
|
src/platform/C4FileMonitorMac.mm
|
2010-12-27 03:49:02 +00:00
|
|
|
src/platform/StdMacWindow.mm
|
|
|
|
src/platform/ClonkAppDelegate.h
|
|
|
|
src/platform/ClonkAppDelegate.mm
|
2009-05-29 21:05:50 +00:00
|
|
|
)
|
2010-12-27 03:49:02 +00:00
|
|
|
if(USE_COCOA)
|
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
|
|
|
src/platform/ConsoleWindowController.h
|
|
|
|
src/platform/ConsoleWindowController.mm
|
|
|
|
src/platform/ClonkWindowController.h
|
|
|
|
src/platform/ClonkWindowController.mm
|
|
|
|
src/platform/ClonkOpenGLView.h
|
|
|
|
src/platform/ClonkOpenGLView.mm
|
|
|
|
src/platform/CocoaKeycodeMap.h
|
|
|
|
src/editor/C4ConsoleCocoa.mm
|
|
|
|
src/platform/ClonkMainMenuActions.mm
|
|
|
|
)
|
|
|
|
endif()
|
2009-05-29 21:05:50 +00:00
|
|
|
endif()
|
|
|
|
if(USE_GTK)
|
2009-08-12 13:01:14 +00:00
|
|
|
list(APPEND OC_CLONK_SOURCES
|
|
|
|
src/res/Brush.h
|
|
|
|
src/res/Cursor.h
|
|
|
|
src/res/Dynamic.h
|
|
|
|
src/res/Exact.h
|
|
|
|
src/res/Fill.h
|
|
|
|
src/res/Halt.h
|
|
|
|
src/res/Ift.h
|
|
|
|
src/res/Line.h
|
|
|
|
src/res/Mouse.h
|
|
|
|
src/res/NoIft.h
|
|
|
|
src/res/Picker.h
|
|
|
|
src/res/Play.h
|
|
|
|
src/res/Rect.h
|
|
|
|
src/res/resource.h
|
|
|
|
src/res/Static.h
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND OC_SYSTEM_SOURCES
|
2009-08-10 15:59:18 +00:00
|
|
|
src/platform/StdGtkWindow.cpp
|
|
|
|
src/platform/StdGtkWindow.h
|
2010-12-11 18:50:38 +00:00
|
|
|
src/editor/C4ConsoleGTK.cpp
|
2009-05-29 21:05:50 +00:00
|
|
|
)
|
|
|
|
endif()
|
2009-08-10 15:59:18 +00:00
|
|
|
|
2009-08-29 21:12:31 +00:00
|
|
|
if(PROJECT_FOLDERS)
|
2011-09-21 20:25:33 +00:00
|
|
|
source_group("Core" src/.*)
|
|
|
|
source_group("Platform abstraction" src/platform/.*)
|
|
|
|
source_group("Utility" src/lib/.*)
|
|
|
|
source_group("C4Group" src/c4group/.*)
|
|
|
|
source_group("Texture" src/lib/texture/.*)
|
2009-08-29 21:12:31 +00:00
|
|
|
source_group("GUI" src/gui/.*)
|
|
|
|
source_group("Network" src/network/.*)
|
2011-09-21 20:25:33 +00:00
|
|
|
source_group("Object" src/game/object/.*)
|
|
|
|
source_group("Landscape" src/game/landscape/.*)
|
|
|
|
source_group("Player" src/game/player/.*)
|
|
|
|
source_group("Script" REGULAR_EXPRESSION .*/script/.*)
|
2009-08-29 21:12:31 +00:00
|
|
|
source_group("Config" src/config/.*)
|
|
|
|
source_group("Control" src/control/.*)
|
|
|
|
source_group("Editing" src/editor/.*)
|
|
|
|
endif()
|
2009-08-12 13:15:05 +00:00
|
|
|
|
2009-05-29 20:53:15 +00:00
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2009-08-10 15:59:18 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/c4group
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/network
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/lib
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/platform
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/config
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/res
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/control
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/gui
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/editor
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/game/landscape
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/game/player
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/game/script
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/game
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/game/object
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/lib/texture
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/script
|
2011-01-25 20:28:44 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
|
2009-05-29 20:53:15 +00:00
|
|
|
)
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
############################################################################
|
|
|
|
# Check for required system headers
|
|
|
|
############################################################################
|
2009-05-29 20:53:15 +00:00
|
|
|
include(CheckIncludeFileCXX)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(direct.h HAVE_DIRECT_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(io.h HAVE_IO_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(locale.h HAVE_LOCALE_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(share.h HAVE_SHARE_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(signal.h HAVE_SIGNAL_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(stdint.h HAVE_STDINT_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(sys/stat.h HAVE_SYS_STAT_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(sys/types.h HAVE_SYS_TYPES_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(unistd.h HAVE_UNISTD_H)
|
2009-05-29 21:05:50 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(execinfo.h HAVE_EXECINFO_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(langinfo.h HAVE_LANGINFO_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(poll.h HAVE_POLL_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(sys/inotify.h HAVE_SYS_INOTIFY_H)
|
2011-03-15 16:27:10 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(sys/timerfd.h HAVE_SYS_TIMERFD_H)
|
2009-05-29 21:05:50 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(sys/socket.h HAVE_SYS_SOCKET_H)
|
2011-03-17 01:26:37 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(sys/eventfd.h HAVE_SYS_EVENTFD_H)
|
2011-03-02 17:54:28 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(sys/file.h HAVE_SYS_FILE_H)
|
2011-01-30 20:44:54 +00:00
|
|
|
if(USE_CONSOLE)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(readline.h HAVE_READLINE_H)
|
|
|
|
CHECK_INCLUDE_FILE_CXX(readline/readline.h HAVE_READLINE_READLINE_H)
|
|
|
|
endif()
|
|
|
|
|
2009-09-20 20:03:44 +00:00
|
|
|
|
|
|
|
# ck 09-09-20: The following headers require Xlib.h for things such as
|
|
|
|
# 'Bool' and 'Window' to be defined. Unfortunately, this doesn't exist
|
|
|
|
# as a CXX version (yet?).
|
|
|
|
include(CheckIncludeFiles)
|
|
|
|
CHECK_INCLUDE_FILES(X11/Xlib.h X11/extensions/xf86vmode.h HAVE_X11_EXTENSIONS_XF86VMODE_H)
|
|
|
|
CHECK_INCLUDE_FILES(X11/Xlib.h X11/extensions/Xrandr.h HAVE_X11_EXTENSIONS_XRANDR_H)
|
|
|
|
CHECK_INCLUDE_FILES(X11/Xlib.h X11/keysym.h HAVE_X11_KEYSYM_H)
|
|
|
|
CHECK_INCLUDE_FILES(X11/Xlib.h X11/xpm.h HAVE_X11_XPM_H)
|
2009-05-29 21:05:50 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(iconv.h HAVE_ICONV)
|
|
|
|
|
|
|
|
if(HAVE_ICONV)
|
|
|
|
SET(ICONV_CONST ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(CheckFunctionExists)
|
|
|
|
CHECK_FUNCTION_EXISTS(vasprintf HAVE_VASPRINTF)
|
2009-05-29 20:53:15 +00:00
|
|
|
|
2010-02-09 18:21:00 +00:00
|
|
|
if(HAVE_ICONV)
|
|
|
|
CHECK_FUNCTION_EXISTS(iconv HAVE_ICONV_WO_LINK)
|
|
|
|
mark_as_advanced(HAVE_ICONV_WO_LINK)
|
2010-02-09 18:01:53 +00:00
|
|
|
|
2010-02-09 18:21:00 +00:00
|
|
|
if(NOT HAVE_ICONV_WO_LINK)
|
|
|
|
FIND_LIBRARY( ICONV_LIBRARY NAMES iconv )
|
|
|
|
MARK_AS_ADVANCED( ICONV_LIBRARY )
|
|
|
|
endif()
|
2010-02-09 18:01:53 +00:00
|
|
|
endif()
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
############################################################################
|
|
|
|
# Locate necessary libraries
|
|
|
|
############################################################################
|
|
|
|
# Find win32 SDK, since a lot of users don't have the include path in their environment
|
2010-01-07 13:30:45 +00:00
|
|
|
if(MSVC)
|
2009-10-20 03:39:24 +00:00
|
|
|
get_filename_component(WINSDK_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
|
|
|
|
mark_as_advanced(WINSDK_ROOT)
|
|
|
|
include_directories(SYSTEM ${WINSDK_ROOT}/Include)
|
|
|
|
if(${FIND_LIBRARY_USE_LIB64_PATHS})
|
|
|
|
list(APPEND CMAKE_LIBRARY_PATH ${WINSDK_ROOT}/Lib/x64)
|
|
|
|
else()
|
|
|
|
list(APPEND CMAKE_LIBRARY_PATH ${WINSDK_ROOT}/Lib)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
SET(JPEG_NAMES ${JPEG_NAMES} libjpeg)
|
|
|
|
include(FindJPEG)
|
|
|
|
include(FindPNG)
|
|
|
|
include(FindZLIB)
|
2011-05-21 15:38:54 +00:00
|
|
|
include_directories(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
|
|
|
|
2010-04-19 12:42:20 +00:00
|
|
|
find_package("Boost" 1.40.0)
|
2010-03-02 16:12:28 +00:00
|
|
|
if(NOT Boost_INCLUDE_DIR)
|
|
|
|
message(SEND_ERROR "Could not find the Boost C++ Libraries")
|
2010-03-02 17:56:10 +00:00
|
|
|
else()
|
|
|
|
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
|
2010-03-02 16:12:28 +00:00
|
|
|
endif()
|
2009-10-20 03:39:24 +00:00
|
|
|
|
|
|
|
include(FindThreads)
|
|
|
|
if(NOT WIN32)
|
|
|
|
SET(HAVE_PTHREAD ${CMAKE_USE_PTHREADS_INIT} CACHE INTERNAL "libpthread available")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# isilkor 09-05-29: FindFreetype only checks for no-ver and 219
|
|
|
|
find_library(FREETYPE_LIBRARY NAMES freetype239)
|
|
|
|
include(FindFreetype)
|
|
|
|
include_directories(${FREETYPE_INCLUDE_DIRS})
|
|
|
|
SET(HAVE_FREETYPE ${FREETYPE_FOUND} CACHE INTERNAL "Rename of FREETYPE_FOUND for config.h")
|
|
|
|
|
|
|
|
# FINDLIB works the same as find_library, but also marks the resulting var as
|
|
|
|
# advanced so it doesn't show in GUIs by default
|
|
|
|
macro(FINDLIB lib)
|
|
|
|
find_library(${ARGV})
|
|
|
|
mark_as_advanced(${lib})
|
|
|
|
endmacro(FINDLIB)
|
2010-09-22 15:11:19 +00:00
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
# isilkor 09-05-29: Don't use FindOpenSSL, because that wants to link to ssleay
|
|
|
|
FINDLIB(OPENSSL_LIBRARIES NAMES crypto libeay32)
|
2010-04-19 20:22:03 +00:00
|
|
|
FIND_PATH(OPENSSL_INCLUDE_DIR NAMES openssl/sha.h)
|
2010-04-18 20:02:01 +00:00
|
|
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
2009-10-20 03:39:24 +00:00
|
|
|
|
2011-01-30 20:44:54 +00:00
|
|
|
if(USE_CONSOLE)
|
|
|
|
include(./FindReadline.cmake)
|
|
|
|
include_directories(${READLINE_INCLUDE_DIRS})
|
|
|
|
SET(HAVE_LIBREADLINE ${READLINE_FOUND} CACHE INTERNAL "libreadline available")
|
|
|
|
endif()
|
|
|
|
|
2011-08-31 17:40:22 +00:00
|
|
|
# Set GTK link directory. This needs to be done before add_executable,
|
|
|
|
# otherwise the path is not used for linking clonk
|
|
|
|
if(USE_GTK)
|
|
|
|
include(FindPkgConfig)
|
|
|
|
if (USE_GTK3)
|
|
|
|
pkg_check_modules(GTK3 REQUIRED "glib-2.0 >= 2.27.5" "gtk+-3.0 >= 2.99.0")
|
|
|
|
include_directories(${GTK3_INCLUDE_DIRS})
|
|
|
|
link_directories(${GTK3_LIBRARY_DIRS})
|
|
|
|
else()
|
|
|
|
pkg_check_modules(GTK REQUIRED "glib-2.0 >= 2.8" "gtk+-2.0 >= 2.8")
|
|
|
|
include_directories(${GTK_INCLUDE_DIRS})
|
|
|
|
link_directories(${GTK_LIBRARY_DIRS})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(USE_OPEN_AL)
|
|
|
|
FINDLIB(VORBIS_LIBRARY NAMES vorbis)
|
|
|
|
FINDLIB(VORBISFILE_LIBRARY NAMES vorbisfile)
|
|
|
|
FINDLIB(OGG_LIBRARY NAMES ogg)
|
|
|
|
endif()
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
############################################################################
|
|
|
|
# Precompiled header support, part 1 (pre-target)
|
|
|
|
############################################################################
|
|
|
|
if(HAVE_PRECOMPILED_HEADERS)
|
2009-10-20 04:05:49 +00:00
|
|
|
if(MSVC_VERSION)
|
|
|
|
list(INSERT OC_SYSTEM_SOURCES 0 src/C4Include.cpp)
|
|
|
|
endif()
|
2009-10-20 03:39:24 +00:00
|
|
|
endif()
|
2009-05-29 20:53:15 +00:00
|
|
|
|
2010-08-01 13:49:51 +00:00
|
|
|
############################################################################
|
|
|
|
# Mac OS bundle setup
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
|
|
|
|
list(APPEND OC_BUNDLE_RESOURCES
|
|
|
|
src/res/Clonk.icns
|
2011-03-14 20:54:56 +00:00
|
|
|
src/res/ocd.icns src/res/ocf.icns src/res/ocg.icns
|
|
|
|
src/res/C4P.icns src/res/ocs.icns src/res/ocu.icns
|
2010-12-27 03:49:02 +00:00
|
|
|
src/res/MainMenu.xib
|
|
|
|
src/res/FullscreenWindow.xib
|
|
|
|
src/res/ConsoleGUIWindow.xib
|
|
|
|
src/res/ClonkWindow.xib
|
|
|
|
src/res/ConsoleWindow.xib
|
|
|
|
src/res/Mouse_Trans.png
|
|
|
|
src/res/Cursor_Trans.png
|
|
|
|
src/res/Brush_Trans.png
|
|
|
|
src/res/Play_Trans.png
|
|
|
|
src/res/Halt_Trans.png
|
|
|
|
src/res/Dynamic_Trans.png
|
|
|
|
src/res/Static_Trans.png
|
|
|
|
src/res/Exact_Trans.png
|
|
|
|
src/res/Line_Trans.png
|
|
|
|
src/res/Rect_Trans.png
|
|
|
|
src/res/Fill_Trans.png
|
|
|
|
src/res/Picker_Trans.png
|
|
|
|
src/res/Ift_Trans.png
|
|
|
|
src/res/NoIft_Trans.png
|
2010-08-01 13:49:51 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Add icon resources
|
|
|
|
set_source_files_properties(
|
|
|
|
${OC_BUNDLE_RESOURCES}
|
|
|
|
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
|
|
|
|
)
|
|
|
|
list(APPEND OC_SYSTEM_SOURCES ${OC_BUNDLE_RESOURCES})
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
############################################################################
|
|
|
|
# Generate output files
|
|
|
|
############################################################################
|
2010-09-22 15:11:19 +00:00
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
add_definitions(-DHAVE_CONFIG_H)
|
|
|
|
add_executable(clonk WIN32 MACOSX_BUNDLE
|
|
|
|
${OC_SYSTEM_SOURCES}
|
|
|
|
${OC_CLONK_SOURCES}
|
|
|
|
)
|
2010-09-22 15:11:19 +00:00
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
add_executable(c4group
|
|
|
|
src/c4group/c4group_ng.cpp
|
|
|
|
src/c4group/C4Group.cpp
|
|
|
|
src/lib/C4InputValidation.cpp
|
|
|
|
src/config/C4SecurityCertificates.cpp
|
|
|
|
src/c4group/C4Update.cpp
|
|
|
|
src/lib/Standard.cpp
|
|
|
|
src/c4group/CStdFile.cpp
|
|
|
|
src/lib/StdMarkup.cpp
|
|
|
|
src/lib/StdBuf.cpp
|
|
|
|
src/lib/StdCompiler.cpp
|
|
|
|
src/platform/StdFile.cpp
|
|
|
|
src/platform/StdRegistry.cpp
|
|
|
|
src/lib/StdResStr2.cpp
|
|
|
|
src/zlib/gzio.c
|
2009-10-23 13:24:12 +00:00
|
|
|
src/C4Include.cpp
|
2009-10-20 03:39:24 +00:00
|
|
|
)
|
2011-01-25 17:56:40 +00:00
|
|
|
|
2011-06-03 19:47:12 +00:00
|
|
|
add_executable(netpuncher EXCLUDE_FROM_ALL
|
2011-02-12 14:27:07 +00:00
|
|
|
src/C4Include.cpp
|
2011-01-25 17:56:40 +00:00
|
|
|
src/lib/StdBuf.cpp
|
|
|
|
src/lib/Standard.cpp
|
2011-03-13 16:25:35 +00:00
|
|
|
src/platform/GetTime.cpp
|
2011-01-25 17:56:40 +00:00
|
|
|
src/platform/StdScheduler.cpp
|
|
|
|
src/platform/StdFile.cpp
|
|
|
|
src/network/C4NetIO.cpp
|
|
|
|
src/netpuncher/main.cpp
|
|
|
|
)
|
|
|
|
|
2011-06-03 19:47:12 +00:00
|
|
|
add_executable(c4script
|
2011-03-07 19:53:13 +00:00
|
|
|
src/c4group/C4Group.cpp
|
|
|
|
src/c4group/C4Group.h
|
|
|
|
src/c4group/CStdFile.cpp
|
|
|
|
src/c4group/CStdFile.h
|
|
|
|
src/lib/C4InputValidation.cpp
|
|
|
|
src/lib/C4InputValidation.h
|
|
|
|
src/lib/Standard.cpp
|
|
|
|
src/lib/Standard.h
|
|
|
|
src/lib/StdBuf.cpp
|
|
|
|
src/lib/StdBuf.h
|
|
|
|
src/lib/StdCompiler.cpp
|
|
|
|
src/lib/StdCompiler.h
|
|
|
|
src/lib/StdMarkup.cpp
|
|
|
|
src/lib/StdMarkup.h
|
|
|
|
src/lib/StdResStr2.cpp
|
|
|
|
src/lib/StdResStr2.h
|
2011-03-13 16:25:35 +00:00
|
|
|
src/platform/GetTime.cpp
|
2011-03-07 19:53:13 +00:00
|
|
|
src/platform/StdFile.cpp
|
|
|
|
src/platform/StdFile.h
|
|
|
|
src/lib/C4Real.cpp
|
|
|
|
src/lib/C4Random.cpp
|
|
|
|
src/script/shell.cpp
|
|
|
|
src/script/C4Aul.cpp
|
|
|
|
src/script/C4AulExec.cpp
|
|
|
|
src/script/C4AulLink.cpp
|
|
|
|
src/script/C4AulParse.cpp
|
|
|
|
src/script/C4StringTable.cpp
|
|
|
|
src/script/C4PropList.cpp
|
|
|
|
src/script/C4ScriptHost.cpp
|
|
|
|
src/script/C4ValueArray.cpp
|
|
|
|
src/script/C4Value.cpp
|
|
|
|
src/script/C4ValueMap.cpp
|
|
|
|
src/game/object/C4Id.cpp
|
|
|
|
src/script/C4Script.cpp
|
|
|
|
src/c4group/C4GroupSet.cpp
|
|
|
|
src/c4group/C4ComponentHost.cpp
|
|
|
|
src/c4group/C4LangStringTable.cpp
|
2011-06-02 20:10:52 +00:00
|
|
|
src/C4Include.cpp
|
2011-03-07 19:53:13 +00:00
|
|
|
)
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
target_link_libraries(clonk
|
|
|
|
${FREETYPE_LIBRARIES}
|
|
|
|
${ZLIB_LIBRARIES}
|
|
|
|
${PNG_LIBRARIES}
|
|
|
|
${JPEG_LIBRARIES}
|
|
|
|
${OPENSSL_LIBRARIES}
|
2010-02-09 18:01:53 +00:00
|
|
|
${ICONV_LIBRARY}
|
2010-12-27 03:49:02 +00:00
|
|
|
${VORBIS_LIBRARY}
|
|
|
|
${VORBISFILE_LIBRARY}
|
|
|
|
${OGG_LIBRARY}
|
2009-10-20 03:39:24 +00:00
|
|
|
)
|
|
|
|
target_link_libraries(c4group
|
|
|
|
${ZLIB_LIBRARIES}
|
|
|
|
${OPENSSL_LIBRARIES}
|
|
|
|
)
|
2011-03-07 19:53:13 +00:00
|
|
|
target_link_libraries(c4script
|
|
|
|
${ZLIB_LIBRARIES}
|
|
|
|
${OPENSSL_LIBRARIES}
|
|
|
|
)
|
2011-01-27 00:15:48 +00:00
|
|
|
if(HAVE_PTHREAD)
|
|
|
|
target_link_libraries(netpuncher
|
|
|
|
pthread
|
|
|
|
)
|
2011-03-07 19:53:13 +00:00
|
|
|
target_link_libraries(c4script
|
|
|
|
pthread
|
|
|
|
)
|
2011-01-27 00:15:48 +00:00
|
|
|
endif()
|
2011-01-30 20:44:54 +00:00
|
|
|
if(USE_CONSOLE)
|
|
|
|
target_link_libraries(clonk
|
|
|
|
pthread
|
|
|
|
${READLINE_LIBRARIES}
|
|
|
|
)
|
|
|
|
endif()
|
2010-02-17 21:59:46 +00:00
|
|
|
set_property(TARGET clonk APPEND PROPERTY COMPILE_DEFINITIONS GLEW_STATIC)
|
2009-10-20 03:39:24 +00:00
|
|
|
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
|
|
|
|
|
2010-12-27 03:49:02 +00:00
|
|
|
if (APPLE)
|
|
|
|
add_custom_command(TARGET clonk
|
|
|
|
POST_BUILD COMMAND "/bin/sh" "${CMAKE_CURRENT_SOURCE_DIR}/tools/osx_bundle_libs.sh"
|
|
|
|
)
|
|
|
|
SET_TARGET_PROPERTIES(clonk PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
|
|
|
|
SET_TARGET_PROPERTIES(clonk PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
|
|
|
|
SET_TARGET_PROPERTIES(clonk PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
|
|
|
|
SET_TARGET_PROPERTIES(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER YES)
|
|
|
|
SET_TARGET_PROPERTIES(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/C4Include.h")
|
|
|
|
SET_TARGET_PROPERTIES(c4group PROPERTIES XCODE_ATTRIBUTE_GCC_PFE_FILE_C_DIALECTS "c++ objective-c++")
|
|
|
|
endif()
|
|
|
|
|
2010-08-01 13:49:51 +00:00
|
|
|
# This expands some variables in Info.plist as a side-effect. XCode might then
|
|
|
|
# expand a second time, using the same syntax. Try not to get confused by this!
|
2010-12-27 03:49:02 +00:00
|
|
|
set_target_properties(clonk PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/src/res/Info.plist")
|
2010-08-01 13:49:51 +00:00
|
|
|
|
2010-02-08 20:51:48 +00:00
|
|
|
############################################################################
|
|
|
|
# build to planet
|
|
|
|
############################################################################
|
|
|
|
if(BUILD_TO_PLANET)
|
2010-12-27 03:49:02 +00:00
|
|
|
if(CMAKE_VERSION VERSION_LESS "2.8")
|
|
|
|
message(SEND_ERROR "You need CMake 2.8 or higher for BUILD_TO_PLANET to get the builds out of the sub folders. You have ${CMAKE_VERSION}")
|
|
|
|
else()
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/planet)
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/planet)
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_CURRENT_SOURCE_DIR}/planet)
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_CURRENT_SOURCE_DIR}/planet)
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_NAME_RELEASE "Clonk")
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_NAME_DEBUG "ClonkD")
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_NAME_MINSIZEREL "ClonkMSR")
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_NAME_RELWITHDEBINFO "ClonkRD")
|
|
|
|
set_target_properties(clonk PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/planet)
|
2010-02-08 20:51:48 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
############################################################################
|
|
|
|
# Precompiled header support, part 2 (post-target)
|
|
|
|
############################################################################
|
|
|
|
if(HAVE_PRECOMPILED_HEADERS)
|
2009-10-20 04:05:49 +00:00
|
|
|
if(MSVC_VERSION)
|
|
|
|
get_property(OC_SOURCES TARGET clonk PROPERTY SOURCES)
|
|
|
|
foreach(FILE ${OC_SOURCES})
|
|
|
|
get_filename_component(FILE_EXT ${FILE} EXT)
|
2010-01-04 02:15:50 +00:00
|
|
|
get_filename_component(FILE_NAME_WE ${FILE} NAME_WE)
|
2011-01-25 20:28:44 +00:00
|
|
|
if(FILE_EXT STREQUAL ".cpp")
|
2009-10-20 04:05:49 +00:00
|
|
|
# This check is necessary since gzio.c gets compiled as C
|
|
|
|
# code, which can't use C++ PCH.
|
|
|
|
set_property(SOURCE ${FILE} PROPERTY COMPILE_FLAGS /YuC4Include.h)
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
set_property(SOURCE src/C4Include.cpp PROPERTY COMPILE_FLAGS /YcC4Include.h)
|
|
|
|
endif()
|
2009-10-20 03:39:24 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# Assemble compiler flags
|
|
|
|
############################################################################
|
2011-01-06 20:18:13 +00:00
|
|
|
if(UNIX)
|
|
|
|
# Don't put this into CMAKE_CXX_FLAGS because otherwise it is cached,
|
|
|
|
# and when the path is changed both the old and new definition appears
|
|
|
|
# in the list of flags.
|
|
|
|
add_definitions("-DOC_SYSTEM_DATA_DIR=\"${CMAKE_INSTALL_PREFIX}/share/openclonk\"")
|
|
|
|
endif()
|
2009-10-20 03:39:24 +00:00
|
|
|
if(OC_CXX_FLAGS)
|
|
|
|
list(REMOVE_DUPLICATES OC_CXX_FLAGS)
|
|
|
|
endif()
|
|
|
|
set(CMAKE_CXX_FLAGS "" CACHE STRING "C++ compiler flags" FORCE)
|
|
|
|
foreach(FLAG ${OC_CXX_FLAGS})
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}" CACHE STRING "C++ compiler flags" FORCE)
|
|
|
|
endforeach()
|
2010-10-22 19:19:49 +00:00
|
|
|
if(OC_CXX_FLAGS_DEBUG)
|
|
|
|
list(REMOVE_DUPLICATES OC_CXX_FLAGS_DEBUG)
|
|
|
|
endif()
|
2009-10-20 03:39:24 +00:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
|
|
|
|
foreach(FLAG ${OC_CXX_FLAGS_DEBUG})
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}" CACHE STRING "Flags used by the compiler during debug builds." FORCE)
|
|
|
|
endforeach()
|
2011-08-19 13:50:40 +00:00
|
|
|
if(OC_EXE_LINKER_FLAGS_DEBUG)
|
|
|
|
list(REMOVE_DUPLICATES OC_CXX_FLAGS_DEBUG)
|
|
|
|
endif()
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "" CACHE STRING "Flags used by the linker during debug builds." FORCE)
|
|
|
|
foreach(FLAG ${OC_EXE_LINKER_FLAGS_DEBUG})
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${FLAG}" CACHE STRING "Flags used by the linker during debug builds." FORCE)
|
|
|
|
endforeach()
|
2009-05-29 20:53:15 +00:00
|
|
|
|
2011-03-12 21:01:23 +00:00
|
|
|
############################################################################
|
|
|
|
# Precompiled header support, gcc part (it needs the cxx flags)
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
include(GccPchSupport.cmake)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
if(NOT DEFINED USE_GCC_PCH)
|
|
|
|
message("Using GCC precompiled headers! USE_GCC_PCH=Off to disable.")
|
|
|
|
endif()
|
|
|
|
option(USE_GCC_PCH "Use GCC precompiled headers" ON)
|
|
|
|
endif()
|
|
|
|
if(USE_GCC_PCH)
|
|
|
|
add_precompiled_header(clonk src/C4Include.h)
|
|
|
|
add_precompiled_header(c4group src/C4Include.h)
|
|
|
|
endif()
|
|
|
|
|
2009-10-20 03:39:24 +00:00
|
|
|
############################################################################
|
|
|
|
# Locate optional libraries (if so desired)
|
|
|
|
############################################################################
|
2010-10-04 22:14:07 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(getopt.h HAVE_GETOPT_H)
|
|
|
|
if(NOT HAVE_GETOPT_H)
|
|
|
|
include_directories(thirdparty/getopt)
|
|
|
|
add_subdirectory(thirdparty/getopt)
|
|
|
|
target_link_libraries(clonk getopt)
|
2010-10-06 20:21:09 +00:00
|
|
|
elseif(MINGW)
|
2011-05-12 15:13:38 +00:00
|
|
|
# Link libiberty which my contain getopt with mingw
|
|
|
|
FINDLIB(iberty_LIBRARIES iberty)
|
|
|
|
if(iberty_LIBRARIES)
|
|
|
|
target_link_libraries(clonk iberty)
|
|
|
|
endif()
|
2010-10-04 22:14:07 +00:00
|
|
|
endif()
|
2010-09-22 15:11:19 +00:00
|
|
|
|
2011-01-02 00:20:52 +00:00
|
|
|
CHECK_INCLUDE_FILE_CXX(getopt.h HAVE_GETOPT_H)
|
|
|
|
|
2011-01-25 20:28:44 +00:00
|
|
|
# TinyXML
|
|
|
|
add_subdirectory(thirdparty/tinyxml)
|
|
|
|
target_link_libraries(clonk tinyxml)
|
|
|
|
|
2011-01-02 00:20:52 +00:00
|
|
|
if(GENERATE_MINI_DUMP)
|
|
|
|
FIND_PATH(DBGHELP_INCLUDE_DIR NAMES dbghelp.h)
|
|
|
|
FINDLIB(DBGHELP_LIBRARIES NAMES dbghelp)
|
|
|
|
target_link_libraries(clonk ${DBGHELP_LIBRARIES})
|
|
|
|
include_directories(${DBGHELP_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2009-05-29 20:53:15 +00:00
|
|
|
if(USE_GL)
|
|
|
|
include(FindOpenGL)
|
2009-08-16 12:17:27 +00:00
|
|
|
FINDLIB(GLEW_LIBRARIES NAMES GLEW glew32 glew32s)
|
2010-04-18 20:02:01 +00:00
|
|
|
FIND_PATH(GLEW_INCLUDE_DIR NAMES GL/glew.h)
|
2009-08-13 16:09:00 +00:00
|
|
|
target_link_libraries(clonk
|
2009-08-16 12:17:27 +00:00
|
|
|
${GLEW_LIBRARIES}
|
2009-08-15 19:55:26 +00:00
|
|
|
${OPENGL_LIBRARIES}
|
2009-08-13 16:09:00 +00:00
|
|
|
)
|
2010-04-18 20:02:01 +00:00
|
|
|
include_directories(${GLEW_INCLUDE_DIR})
|
2009-05-29 20:53:15 +00:00
|
|
|
endif()
|
|
|
|
if(USE_DIRECTX)
|
2009-08-16 12:17:27 +00:00
|
|
|
FINDLIB(DIRECT3D_LIBRARIES d3d9)
|
|
|
|
FINDLIB(DIRECT3DX_LIBRARIES d3dx9)
|
2010-04-18 20:02:01 +00:00
|
|
|
FIND_PATH(DIRECT3D_INCLUDE_DIR NAMES d3d9.h)
|
|
|
|
FIND_PATH(DIRECT3DX_INCLUDE_DIR NAMES d3dx9.h)
|
2009-08-13 16:09:00 +00:00
|
|
|
target_link_libraries(clonk
|
2009-08-16 12:17:27 +00:00
|
|
|
${DIRECT3D_LIBRARIES}
|
|
|
|
${DIRECT3DX_LIBRARIES}
|
2009-08-13 16:09:00 +00:00
|
|
|
)
|
2010-04-18 20:02:01 +00:00
|
|
|
include_directories(
|
|
|
|
${DIRECT3D_INCLUDE_DIR}
|
|
|
|
${DIRECT3DX_INCLUDE_DIR}
|
|
|
|
)
|
2009-05-29 20:53:15 +00:00
|
|
|
endif()
|
2009-05-29 21:05:50 +00:00
|
|
|
if(USE_GTK)
|
2011-08-31 17:40:22 +00:00
|
|
|
SET(WITH_DEVELOPER_MODE ${GTK_FOUND})
|
|
|
|
SET(WITH_GLIB ${GTK_FOUND})
|
|
|
|
if(USE_GTK3)
|
|
|
|
target_link_libraries(clonk
|
|
|
|
${GTK3_LIBRARIES}
|
|
|
|
)
|
|
|
|
else()
|
2009-08-13 16:09:00 +00:00
|
|
|
target_link_libraries(clonk
|
|
|
|
${GTK_LIBRARIES}
|
|
|
|
)
|
2009-05-29 21:05:50 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
if(USE_X11)
|
2009-08-16 12:17:27 +00:00
|
|
|
FINDLIB(X11_LIBRARIES X11)
|
|
|
|
FINDLIB(XPM_LIBRARIES Xpm)
|
|
|
|
FINDLIB(XXF86VM_LIBRARIES Xxf86vm)
|
|
|
|
FINDLIB(XRANDR_LIBRARIES Xrandr)
|
2009-08-13 16:09:00 +00:00
|
|
|
target_link_libraries(clonk
|
2009-08-16 12:17:27 +00:00
|
|
|
${X11_LIBRARIES}
|
|
|
|
${XPM_LIBRARIES}
|
|
|
|
${XXF86VM_LIBRARIES}
|
|
|
|
${XRANDR_LIBRARIES}
|
2009-08-13 16:09:00 +00:00
|
|
|
)
|
2009-05-29 21:05:50 +00:00
|
|
|
endif()
|
2010-12-27 03:49:02 +00:00
|
|
|
if(USE_COCOA)
|
|
|
|
#stupid fix: just link to iconv that way
|
|
|
|
TARGET_LINK_LIBRARIES(clonk "-framework Cocoa -framework AppKit -framework Quartz -framework OpenAL -framework AudioToolBox -liconv")
|
|
|
|
endif()
|
2009-05-29 21:05:50 +00:00
|
|
|
if (WIN32)
|
2010-01-07 13:30:45 +00:00
|
|
|
# CMake is too incompetent to check whether these libraries can be linked to
|
|
|
|
# So just pretend that everything is fine
|
2010-04-18 20:02:01 +00:00
|
|
|
FINDLIB(VFW32_LIBRARIES vfw32)
|
2011-05-12 15:13:38 +00:00
|
|
|
FINDLIB(wavifil32_LIBRARIES wavifil32)
|
2010-04-18 20:02:01 +00:00
|
|
|
if (VFW32_LIBRARIES)
|
|
|
|
target_link_libraries(clonk vfw32)
|
2011-05-12 15:13:38 +00:00
|
|
|
set(HAVE_VFW32 TRUE)
|
|
|
|
elseif(wavifil32_LIBRARIES)
|
2010-04-18 20:02:01 +00:00
|
|
|
target_link_libraries(clonk wavifil32 msvfw32)
|
2011-05-12 15:13:38 +00:00
|
|
|
set(HAVE_VFW32 TRUE)
|
2010-04-18 20:02:01 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
target_link_libraries(clonk ws2_32 winmm)
|
2010-01-07 13:30:45 +00:00
|
|
|
target_link_libraries(c4group ws2_32)
|
2011-01-25 17:56:40 +00:00
|
|
|
target_link_libraries(netpuncher ws2_32 winmm)
|
2011-03-07 19:53:13 +00:00
|
|
|
target_link_libraries(c4script ws2_32 winmm)
|
2009-05-29 20:53:15 +00:00
|
|
|
|
2010-12-27 03:49:02 +00:00
|
|
|
if(NOT USE_OPEN_AL)
|
|
|
|
if(MSVC_VERSION)
|
|
|
|
if(CMAKE_CL_64)
|
|
|
|
FINDLIB(FMOD_LIBRARIES fmod64vc)
|
|
|
|
else()
|
|
|
|
FINDLIB(FMOD_LIBRARIES fmodvc)
|
|
|
|
endif()
|
|
|
|
elseif(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
FINDLIB(FMOD_LIBRARIES fmod)
|
|
|
|
endif()
|
|
|
|
if(FMOD_LIBRARIES)
|
|
|
|
set(HAVE_FMOD TRUE)
|
|
|
|
target_link_libraries(clonk
|
|
|
|
${FMOD_LIBRARIES}
|
|
|
|
)
|
2010-04-18 19:38:17 +00:00
|
|
|
else()
|
2010-12-27 03:49:02 +00:00
|
|
|
set(HAVE_FMOD FALSE)
|
2010-04-18 19:38:17 +00:00
|
|
|
endif()
|
2009-07-11 17:44:14 +00:00
|
|
|
endif()
|
2009-07-11 01:14:57 +00:00
|
|
|
endif()
|
2011-01-25 17:56:40 +00:00
|
|
|
if(NOT HAVE_FMOD AND NOT USE_OPEN_AL OR USE_SDL_MAINLOOP AND NOT USE_OPEN_AL)
|
2009-11-02 13:18:47 +00:00
|
|
|
include(FindSDL)
|
|
|
|
SET(HAVE_SDL ${SDL_FOUND})
|
|
|
|
if(SDL_FOUND)
|
|
|
|
include_directories(${SDL_INCLUDE_DIR})
|
|
|
|
FINDLIB(SDLMIXER_LIBRARIES SDL_mixer)
|
|
|
|
if(SDLMIXER_LIBRARIES)
|
|
|
|
SET(HAVE_LIBSDL_MIXER ON)
|
|
|
|
endif()
|
|
|
|
target_link_libraries(clonk
|
|
|
|
${SDL_LIBRARY}
|
|
|
|
${SDLMIXER_LIBRARIES}
|
|
|
|
)
|
2009-07-12 16:46:54 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2011-05-17 16:33:28 +00:00
|
|
|
# GTest
|
|
|
|
include(FindGTest)
|
|
|
|
if(GTEST_FOUND)
|
|
|
|
include_directories(${GTEST_INCLUDE_DIRS})
|
|
|
|
add_executable(tests EXCLUDE_FROM_ALL
|
|
|
|
tests/UnicodeHandlingTest.cpp
|
|
|
|
tests/main.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(tests ${GTEST_LIBRARIES})
|
|
|
|
endif()
|
2010-09-22 15:11:19 +00:00
|
|
|
|
2009-05-29 20:53:15 +00:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
2010-08-03 15:59:36 +00:00
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# installation
|
|
|
|
############################################################################
|
2010-12-30 00:21:07 +00:00
|
|
|
# Install the icon into share/icons/hicolor/48x48/apps/clonk.png. Do this by
|
|
|
|
# extracting the correct size from oc.ico. Currently this is layer 2 - let's
|
|
|
|
# hope that it stays this way.
|
|
|
|
# TODO: Check for convert at configure step?
|
2011-01-06 20:18:13 +00:00
|
|
|
install(DIRECTORY DESTINATION share/icons/hicolor/48x48/apps)
|
2010-12-30 00:21:07 +00:00
|
|
|
install(CODE "
|
|
|
|
EXECUTE_PROCESS(COMMAND \"convert\" \"${CMAKE_CURRENT_SOURCE_DIR}/src/res/oc.ico[2]\" \"${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps/clonk.png\" RESULT_VARIABLE CONVERT_RESULT)
|
|
|
|
IF(NOT \${CONVERT_RESULT} EQUAL 0)
|
|
|
|
MESSAGE(SEND_ERROR \"Creating icon failed\")
|
|
|
|
ENDIF()
|
|
|
|
")
|
2010-08-03 15:59:36 +00:00
|
|
|
|
2010-12-30 00:21:07 +00:00
|
|
|
# Remove previously installed data files
|
2011-03-13 15:55:00 +00:00
|
|
|
FILE(GLOB OC_INSTALLED_DATA_FILES "${CMAKE_INSTALL_PREFIX}/share/openclonk/*.oc[dfgs]")
|
2010-12-30 00:21:07 +00:00
|
|
|
install(CODE "
|
|
|
|
FOREACH(CURRENT_FILE ${OC_INSTALLED_DATA_FILES})
|
|
|
|
FILE(REMOVE \${CURRENT_FILE})
|
|
|
|
ENDFOREACH()
|
|
|
|
")
|
2010-08-03 15:59:36 +00:00
|
|
|
|
2010-12-30 00:21:07 +00:00
|
|
|
# Install new files
|
2011-03-13 15:55:00 +00:00
|
|
|
FILE(GLOB OC_DATA_FILES "${CMAKE_CURRENT_SOURCE_DIR}/planet/*.oc[dfgs]")
|
2010-12-30 00:21:07 +00:00
|
|
|
install(DIRECTORY ${OC_DATA_FILES} DESTINATION share/openclonk)
|
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/clonk.desktop DESTINATION share/applications)
|
|
|
|
|
|
|
|
# Pack them
|
|
|
|
install(CODE "
|
|
|
|
FOREACH(CURRENT_FILE ${OC_DATA_FILES})
|
|
|
|
GET_FILENAME_COMPONENT(CURRENT_FILENAME \"\${CURRENT_FILE}\" NAME)
|
|
|
|
MESSAGE(\"Packing \${CURRENT_FILENAME}...\")
|
|
|
|
EXECUTE_PROCESS(COMMAND \"${CMAKE_CURRENT_BINARY_DIR}/c4group\" \"${CMAKE_INSTALL_PREFIX}/share/openclonk/\${CURRENT_FILENAME}\" \"-p\" RESULT_VARIABLE C4GROUP_RESULT)
|
|
|
|
IF(NOT \${C4GROUP_RESULT} EQUAL 0)
|
|
|
|
MESSAGE(SEND_ERROR \"Packing ${CURRENT_FILENAME} failed\")
|
|
|
|
ENDIF()
|
|
|
|
ENDFOREACH()
|
|
|
|
")
|
|
|
|
|
|
|
|
# Install binaries
|
|
|
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/clonk ${CMAKE_CURRENT_BINARY_DIR}/c4group DESTINATION bin/)
|
2010-08-03 15:59:36 +00:00
|
|
|
|
2011-09-20 17:43:22 +00:00
|
|
|
############################################################################
|
|
|
|
# setup_openclonk.exe
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
set(OC_C4GROUPS
|
2011-09-21 20:25:33 +00:00
|
|
|
Graphics.ocg
|
|
|
|
Material.ocg
|
|
|
|
Music.ocg
|
|
|
|
Sound.ocg
|
|
|
|
System.ocg
|
|
|
|
Objects.ocd
|
|
|
|
BackToTheRocks.ocf
|
|
|
|
Tutorial.ocf
|
2011-09-20 17:43:22 +00:00
|
|
|
)
|
|
|
|
|
2011-09-21 20:25:33 +00:00
|
|
|
get_target_property(C4GROUP_LOCATION c4group LOCATION)
|
|
|
|
get_target_property(CLONK_LOCATION clonk LOCATION)
|
2011-09-20 17:43:22 +00:00
|
|
|
foreach(group ${OC_C4GROUPS})
|
2011-09-21 20:25:33 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${group}
|
|
|
|
COMMAND ${C4GROUP_LOCATION} ${CMAKE_CURRENT_SOURCE_DIR}/planet/${group} -t ${CMAKE_CURRENT_BINARY_DIR}/${group}
|
|
|
|
DEPENDS c4group ${CMAKE_CURRENT_SOURCE_DIR}/planet/${group}
|
|
|
|
VERBATIM
|
|
|
|
)
|
2011-09-20 17:43:22 +00:00
|
|
|
endforeach()
|
|
|
|
|
2011-09-21 20:25:33 +00:00
|
|
|
find_program(MAKENSIS makensis PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS])
|
|
|
|
|
|
|
|
string(REPLACE / \\ C4GROUP_LOCATION ${C4GROUP_LOCATION})
|
|
|
|
string(REPLACE / \\ CLONK_LOCATION ${CLONK_LOCATION})
|
|
|
|
|
2011-09-20 17:43:22 +00:00
|
|
|
add_custom_command(
|
2011-09-21 20:25:33 +00:00
|
|
|
OUTPUT setup_openclonk.exe
|
2011-09-26 23:15:00 +00:00
|
|
|
COMMAND ${MAKENSIS} -NOCD -DSRCDIR=${CMAKE_CURRENT_SOURCE_DIR} -DPROGRAMFILES=$PROGRAMFILES "-DPRODUCT_NAME=${C4ENGINENAME}${C4VERSIONBUILDNAME}" "-DPRODUCT_COMPANY=${C4PROJECT}" "-DCLONK=${CLONK_LOCATION}" "-DC4GROUP=${C4GROUP_LOCATION}" ${CMAKE_CURRENT_SOURCE_DIR}/tools/install/oc.nsi "-XOutFile setup_openclonk.exe"
|
2011-09-21 20:25:33 +00:00
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tools/install/oc.nsi ${OC_C4GROUPS} clonk c4group
|
|
|
|
VERBATIM
|
2011-09-20 17:43:22 +00:00
|
|
|
)
|
|
|
|
|
2011-09-21 20:25:33 +00:00
|
|
|
add_custom_target(setup
|
|
|
|
DEPENDS setup_openclonk.exe
|
|
|
|
SOURCES tools/install/oc.nsi tools/install/header.bmp tools/install/inst.ico tools/install/uninst.ico
|
|
|
|
)
|
2011-09-20 17:43:22 +00:00
|
|
|
|
2010-08-03 15:59:36 +00:00
|
|
|
############################################################################
|
|
|
|
# CPack support
|
|
|
|
############################################################################
|
2010-12-30 00:21:07 +00:00
|
|
|
set(CPACK_PACKAGE_NAME "openclonk")
|
2010-08-03 15:59:36 +00:00
|
|
|
set(CPACK_PACKAGE_VENDOR "${C4PROJECT_URL}")
|
2010-12-30 00:21:07 +00:00
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenClonk - A game mix out of tactic, strategy and Jump & Run")
|
2010-08-03 15:59:36 +00:00
|
|
|
set(CPACK_PACKAGE_VERSION "${C4XVER1}.${C4XVER2}.${C4XVER3}")
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR "${C4XVER1}")
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR "${C4XVER2}")
|
2010-12-30 00:21:07 +00:00
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH "${C4XVER3}")
|
|
|
|
set(CPACK_PACKAGE_FILE_NAME "openclonk-${C4XVER1}.${C4XVER2}.${C4XVER3}")
|
2010-08-03 15:59:36 +00:00
|
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "openclonk-src-${C4XVER1}.${C4XVER2}.${C4XVER3}")
|
|
|
|
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
|
|
|
# Somebody who uses Debian/Ubuntu should set this
|
|
|
|
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libgcc1, libx11, libXrandr, libXpm, libGLEW, libGL, libpng, libssl, libSDL-1.2, libSDL_mixer-1.2, gtk2, libjpeg, zlib")
|
|
|
|
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
|
|
|
|
set(CPACK_RPM_PACKAGE_REQUIRES "libc6, libgcc1, libx11, libXrandr, libXpm, libGLEW, libGL, libpng, libssl, libSDL-1.2, libSDL_mixer-1.2, gtk2, libjpeg, zlib")
|
|
|
|
|
2010-12-30 00:21:07 +00:00
|
|
|
include(CPack)
|