aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/src
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-11 19:59:01 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-05-11 19:59:01 +0000
commit3bac1f9c6c02cbe30f4fbed37366482fcc687e03 (patch)
tree3549fe136d4843db1856c190060d73dc7325ef4f /cmake/src
parent17deba0bcda7f39696bad713bc2c0bc49ec4fb59 (diff)
downloadusdx-3bac1f9c6c02cbe30f4fbed37366482fcc687e03.tar.gz
usdx-3bac1f9c6c02cbe30f4fbed37366482fcc687e03.tar.xz
usdx-3bac1f9c6c02cbe30f4fbed37366482fcc687e03.zip
- Package flags (FLAGS / LIBRARY_FLAGS)
- -k"-U sdl_main" for Mac OS X defined as SDL package LIBRARY_FLAG - plugins moved to game/plugins - BUILD_PLUGINS option added to disable plugin creation (if linking of libraries fails) - PASCAL_FLAGS_... added git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1722 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'cmake/src')
-rw-r--r--cmake/src/CMakeLists.txt12
-rw-r--r--cmake/src/lib/JEDI-SDL/SDL/CMakeLists.txt9
-rw-r--r--cmake/src/lib/projectM/cwrapper/CMakeLists.txt18
-rw-r--r--cmake/src/switches.inc8
4 files changed, 27 insertions, 20 deletions
diff --git a/cmake/src/CMakeLists.txt b/cmake/src/CMakeLists.txt
index 1e920936..08a08197 100644
--- a/cmake/src/CMakeLists.txt
+++ b/cmake/src/CMakeLists.txt
@@ -10,6 +10,12 @@ add_subdirectory(lib)
pascal_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in
${CMAKE_CURRENT_BINARY_DIR}/config-${FPC_PLATFORM}.inc)
+# To conform to the GNU Coding Standards, INSTALL_DATADIR is
+# not hardcoded at configure-time so $prefix and $datadir can be
+# changed at make-time.
+# Paths cannot be passed to fpc via -d as with gcc's -D parameter.
+# We use an intermediate file instead.
+# See [info autoconf], "19.5 How Do I `#define' Installation Directories?"
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/paths.inc
"INSTALL_DATADIR = '${CMAKE_INSTALL_PREFIX}/share/ultrastardx';")
@@ -30,11 +36,11 @@ if(libprojectM_USE_CWRAPPER)
endif(libprojectM_USE_CWRAPPER)
pascal_add_module(ultrastardx ultrastardx.dpr
- #FLAGS -vut
- OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/../game
+ #FPC_FLAGS -Si -Cs2000000 # maybe set stack size?
+ OUTPUT_DIR ${USDX_GAME_DIR}
UNITS
base/*.pas
- #macosx/*.pas
+ macosx/*.pas
media/*.pas
menu/*.pas
screens/*.pas
diff --git a/cmake/src/lib/JEDI-SDL/SDL/CMakeLists.txt b/cmake/src/lib/JEDI-SDL/SDL/CMakeLists.txt
index 69c63d0a..543300c7 100644
--- a/cmake/src/lib/JEDI-SDL/SDL/CMakeLists.txt
+++ b/cmake/src/lib/JEDI-SDL/SDL/CMakeLists.txt
@@ -1,6 +1,15 @@
# $URL$
# $Id$
+
+# Flags for the treatment of a linker issue with SDL on Mac OS X.
+# Symbol _SDK_main is undefined
+set(fpc_lib_flags)
+if(APPLE)
+ set(fpc_lib_flags -k\"-U _SDL_main\")
+endif(APPLE)
+
pascal_add_package(sdl
UNITS Pas/*.pas
INCLUDES Pas/*.inc
+ FPC_LIBRARY_FLAGS ${fpc_lib_flags}
)
diff --git a/cmake/src/lib/projectM/cwrapper/CMakeLists.txt b/cmake/src/lib/projectM/cwrapper/CMakeLists.txt
index acca3025..3c84736a 100644
--- a/cmake/src/lib/projectM/cwrapper/CMakeLists.txt
+++ b/cmake/src/lib/projectM/cwrapper/CMakeLists.txt
@@ -1,13 +1,11 @@
# $URL$
# $Id$
-if(libprojectM_USE_CWRAPPER)
- include_directories(${libprojectM_INCLUDEDIR}/libprojectM)
- add_definitions(-DPROJECTM_VERSION_INT=${libprojectM_VERSION_INT})
+include_directories(${libprojectM_INCLUDEDIR}/libprojectM)
+add_definitions(-DPROJECTM_VERSION_INT=${libprojectM_VERSION_INT})
- set(projectm_cwrapper_srcs projectM-cwrapper.cpp)
- if(WIN32)
- add_library(projectM-cwrapper SHARED ${projectm_cwrapper_srcs})
- else(WIN32)
- add_library(projectM-cwrapper STATIC ${projectm_cwrapper_srcs})
- endif(WIN32)
-endif(libprojectM_USE_CWRAPPER)
+set(projectm_cwrapper_srcs projectM-cwrapper.cpp)
+if(WIN32)
+ add_library(projectM-cwrapper EXCLUDE_FROM_ALL SHARED ${projectm_cwrapper_srcs})
+else(WIN32)
+ add_library(projectM-cwrapper EXCLUDE_FROM_ALL STATIC ${projectm_cwrapper_srcs})
+endif(WIN32)
diff --git a/cmake/src/switches.inc b/cmake/src/switches.inc
index 215fe239..17ebd1b8 100644
--- a/cmake/src/switches.inc
+++ b/cmake/src/switches.inc
@@ -5,12 +5,6 @@
{$IFDEF FPC}
{$H+} // use AnsiString instead of ShortString as String-type (default in Delphi)
- // if -dDEBUG is specified on the command-line, FPC uses some default
- // compiler-flags specified in fpc.cfg -> use -dDEBUG_MODE instead
- {$IFDEF DEBUG_MODE}
- {$DEFINE DEBUG}
- {$ENDIF}
-
{$DEFINE HasInline}
{$ELSE}
{$DEFINE Delphi}
@@ -114,4 +108,4 @@
{$DEFINE UsePortaudio}
{$IFEND}
-{$ENDIF PASDOC} \ No newline at end of file
+{$ENDIF PASDOC}