diff options
Diffstat (limited to '')
-rw-r--r-- | cmake/src/CMakeLists.txt | 12 | ||||
-rw-r--r-- | cmake/src/lib/JEDI-SDL/SDL/CMakeLists.txt | 9 | ||||
-rw-r--r-- | cmake/src/lib/projectM/cwrapper/CMakeLists.txt | 18 | ||||
-rw-r--r-- | cmake/src/switches.inc | 8 |
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} |