|
|
|
@ -1,49 +1,3 @@
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Snowballs
|
|
|
|
|
# Author: Nevrax
|
|
|
|
|
#
|
|
|
|
|
# Notes:
|
|
|
|
|
# * Changing install location: add -DCMAKE_INSTALL_PREFIX:PATH=/my/new/path
|
|
|
|
|
# * Changing NeL prefix: add -DNEL_PREFIX_PATH:PATH=/my/nel/install
|
|
|
|
|
#
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
# Load some macros.
|
|
|
|
|
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
|
|
|
|
|
INCLUDE(CMakeModules/nel.cmake)
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
# Force out of source builds.
|
|
|
|
|
CHECK_OUT_OF_SOURCE()
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
|
SET(CMAKE_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/../3rdParty/include;${CMAKE_INCLUDE_PATH}")
|
|
|
|
|
SET(CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/../3rdParty/lib;${CMAKE_LIBRARY_PATH}")
|
|
|
|
|
IF(NOT DEFINED ENV{QTDIR})
|
|
|
|
|
SET(ENV{QTDIR} "c:/qt/4.5.0")
|
|
|
|
|
ENDIF(NOT DEFINED ENV{QTDIR})
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
|
|
IF(DEFINED NEL_PREFIX_PATH)
|
|
|
|
|
SET(CMAKE_INCLUDE_PATH "${NEL_PREFIX_PATH}/include;${CMAKE_INCLUDE_PATH}")
|
|
|
|
|
SET(CMAKE_LIBRARY_PATH "${NEL_PREFIX_PATH}/lib;${CMAKE_LIBRARY_PATH}")
|
|
|
|
|
ENDIF(DEFINED NEL_PREFIX_PATH)
|
|
|
|
|
|
|
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
|
|
|
|
|
|
|
|
PROJECT(Snowballs CXX C)
|
|
|
|
|
SET(SB_VERSION_MAJOR 0)
|
|
|
|
|
SET(SB_VERSION_MINOR 4)
|
|
|
|
|
SET(SB_VERSION_PATCH 0)
|
|
|
|
|
SET(SB_VERSION "${SB_VERSION_MAJOR}.${SB_VERSION_MINOR}.${SB_VERSION_PATCH}")
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
# Redirect output files
|
|
|
|
|
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
|
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------^M
|
|
|
|
|
# Set CMake 2.6 Policies.
|
|
|
|
|
IF(COMMAND cmake_policy)
|
|
|
|
@ -92,6 +46,11 @@ IF(BUILD_CLIENT)
|
|
|
|
|
ENDIF(ENABLE_SOUND)
|
|
|
|
|
ENDIF(BUILD_CLIENT)
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
|
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
|
|
|
|
|
SET(WINSOCK2_LIB ws2_32.lib)
|
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
|
|
NL_SETUP_BUILD_FLAGS()
|
|
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DSNOWBALLS_CONFIG="${SNOWBALLS_CONFIG_FILE}/" -DSNOWBALLS_STATE="${SNOWBALLS_LOG_FILE}/" -DSNOWBALLS_LOGS="${SNOWBALLS_LOG_FILE}/")
|
|
|
|
|