mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 08:41:59 +00:00
- Fixed some issues with compiling on the Mac. Some options were added to force compilation of internal libraries and added checks for building ppc binaries on x86.
SVN r2515 (trunk)
This commit is contained in:
parent
096edb0817
commit
99e0adaf45
2 changed files with 19 additions and 15 deletions
|
@ -64,35 +64,39 @@ set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${REL_C_FLAGS}" )
|
|||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_C_FLAGS}" )
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEB_C_FLAGS} -D_DEBUG" )
|
||||
|
||||
if( ZLIB_FOUND )
|
||||
option(FORCE_INTERNAL_ZLIB "Use internal zlib")
|
||||
option(FORCE_INTERNAL_JPEG "Use internal jpeg")
|
||||
option(FORCE_INTERNAL_BZIP2 "Use internal bzip2")
|
||||
|
||||
if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB )
|
||||
message( STATUS "Using system zlib" )
|
||||
else( ZLIB_FOUND )
|
||||
else( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB )
|
||||
message( STATUS "Using internal zlib" )
|
||||
add_subdirectory( zlib )
|
||||
set( ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zlib )
|
||||
set( ZLIB_LIBRARIES z )
|
||||
set( ZLIB_LIBRARY z )
|
||||
endif( ZLIB_FOUND )
|
||||
endif( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB )
|
||||
|
||||
if( JPEG_FOUND )
|
||||
if( JPEG_FOUND AND NOT FORCE_INTERNAL_JPEG )
|
||||
message( STATUS "Using system jpeg library" )
|
||||
else( JPEG_FOUND )
|
||||
else( JPEG_FOUND AND NOT FORCE_INTERNAL_JPEG )
|
||||
message( STATUS "Using internal jpeg library" )
|
||||
add_subdirectory( jpeg-6b )
|
||||
set( JPEG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/jpeg-6b )
|
||||
set( JPEG_LIBRARIES jpeg )
|
||||
set( JPEG_LIBRARY jpeg )
|
||||
endif( JPEG_FOUND )
|
||||
endif( JPEG_FOUND AND NOT FORCE_INTERNAL_JPEG )
|
||||
|
||||
if( BZIP2_FOUND )
|
||||
if( BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2 )
|
||||
message( STATUS "Using system bzip2 library" )
|
||||
else( BZIP2_FOUND )
|
||||
else( BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2 )
|
||||
message( STATUS "Using internal bzip2 library" )
|
||||
add_subdirectory( bzip2 )
|
||||
set( BZIP2_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bzip2" )
|
||||
set( BZIP2_LIBRARIES bz2 )
|
||||
set( BZIP2_LIBRARY bz2 )
|
||||
endif( BZIP2_FOUND)
|
||||
endif( BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2 )
|
||||
|
||||
set( LZMA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lzma/C" )
|
||||
|
||||
|
|
|
@ -232,12 +232,12 @@ endif( FMOD_LIBRARY )
|
|||
|
||||
# Search for NASM
|
||||
|
||||
if( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc )
|
||||
if( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc)
|
||||
if( NOT NO_ASM )
|
||||
message( STATUS "Disabling assembly code for PowerPC." )
|
||||
set( NO_ASM ON )
|
||||
endif( NOT NO_ASM )
|
||||
endif( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc )
|
||||
endif( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc )
|
||||
|
||||
if( NOT NO_ASM )
|
||||
if( UNIX AND X64 )
|
||||
|
@ -432,7 +432,7 @@ add_custom_target( revision_check ALL
|
|||
# Libraries ZDoom needs
|
||||
|
||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${FMOD_LIBRARY}" )
|
||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${FMOD_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
|
||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${FMOD_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" )
|
||||
|
||||
# Start defining source files for ZDoom
|
||||
|
||||
|
@ -515,12 +515,12 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h
|
|||
|
||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
|
||||
|
||||
if( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc )
|
||||
if( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc )
|
||||
set( X86_SOURCES )
|
||||
set( NOT_X86 ON )
|
||||
else( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc )
|
||||
else( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc )
|
||||
set( X86_SOURCES nodebuild_classify_sse2.cpp )
|
||||
endif( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc )
|
||||
endif( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc )
|
||||
|
||||
add_executable( zdoom WIN32
|
||||
autostart.cpp
|
||||
|
|
Loading…
Reference in a new issue