mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- added Hirogen2's patch for using the default BZip2 library under Linux.
SVN r1604 (trunk)
This commit is contained in:
parent
dbddb6403f
commit
e43453b614
4 changed files with 16 additions and 7 deletions
|
@ -13,6 +13,7 @@ if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
set( PROFILE CACHE 0 BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." )
|
set( PROFILE CACHE 0 BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." )
|
||||||
endif( CMAKE_COMPILER_IS_GNUCXX )
|
endif( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
|
||||||
|
find_package( BZip2 )
|
||||||
find_package( JPEG )
|
find_package( JPEG )
|
||||||
find_package( ZLIB )
|
find_package( ZLIB )
|
||||||
|
|
||||||
|
@ -90,10 +91,18 @@ else( JPEG_FOUND )
|
||||||
set( JPEG_LIBRARY jpeg )
|
set( JPEG_LIBRARY jpeg )
|
||||||
endif( JPEG_FOUND )
|
endif( JPEG_FOUND )
|
||||||
|
|
||||||
|
if( BZIP2_FOUND )
|
||||||
|
message( STATUS "Using system bzip2 library" )
|
||||||
|
else( BZIP2_FOUND )
|
||||||
|
message( STATUS "Using internal bzip2 library" )
|
||||||
|
add_subdirectory( bzip2 )
|
||||||
set( BZIP2_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bzip2" )
|
set( BZIP2_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bzip2" )
|
||||||
|
set( BZIP2_LIBRARIES bz2 )
|
||||||
|
set( BZIP2_LIBRARY bz2 )
|
||||||
|
endif( BZIP2_FOUND)
|
||||||
|
|
||||||
set( LZMA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lzma/C" )
|
set( LZMA_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lzma/C" )
|
||||||
|
|
||||||
add_subdirectory( bzip2 )
|
|
||||||
add_subdirectory( lzma )
|
add_subdirectory( lzma )
|
||||||
add_subdirectory( tools )
|
add_subdirectory( tools )
|
||||||
add_subdirectory( snes_spc )
|
add_subdirectory( snes_spc )
|
||||||
|
|
|
@ -5,7 +5,7 @@ if( CMAKE_COMPILER_IS_GNUC )
|
||||||
endif( CMAKE_COMPILER_IS_GNUC )
|
endif( CMAKE_COMPILER_IS_GNUC )
|
||||||
|
|
||||||
add_definitions( -DBZ_NO_STDIO )
|
add_definitions( -DBZ_NO_STDIO )
|
||||||
add_library( bzip2
|
add_library( bz2
|
||||||
blocksort.c
|
blocksort.c
|
||||||
bzlib.c
|
bzlib.c
|
||||||
compress.c
|
compress.c
|
||||||
|
@ -13,4 +13,4 @@ add_library( bzip2
|
||||||
decompress.c
|
decompress.c
|
||||||
huffman.c
|
huffman.c
|
||||||
randtable.c )
|
randtable.c )
|
||||||
target_link_libraries( bzip2 )
|
target_link_libraries( bz2 )
|
||||||
|
|
|
@ -381,7 +381,7 @@ add_custom_target( revision_check ALL
|
||||||
|
|
||||||
# Libraries ZDoom needs
|
# Libraries ZDoom needs
|
||||||
|
|
||||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${FMOD_LIBRARY}" )
|
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}" "${JPEG_INCLUDE_DIR}" "${FMOD_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
|
||||||
|
|
||||||
# Start defining source files for ZDoom
|
# Start defining source files for ZDoom
|
||||||
|
@ -724,7 +724,7 @@ add_executable( zdoom WIN32
|
||||||
set_source_files_properties( xlat/parse_xlat.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c" )
|
set_source_files_properties( xlat/parse_xlat.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c" )
|
||||||
set_source_files_properties( sc_man.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h" )
|
set_source_files_properties( sc_man.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h" )
|
||||||
|
|
||||||
target_link_libraries( zdoom ${ZDOOM_LIBS} snes_spc gdtoa dumb bzip2 lzma )
|
target_link_libraries( zdoom ${ZDOOM_LIBS} snes_spc gdtoa dumb lzma )
|
||||||
include_directories( .
|
include_directories( .
|
||||||
g_doom
|
g_doom
|
||||||
g_heretic
|
g_heretic
|
||||||
|
|
|
@ -5,4 +5,4 @@ message(STATUS "${LZMA_INCLUDE_DIR}" )
|
||||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
|
||||||
add_executable( zipdir
|
add_executable( zipdir
|
||||||
zipdir.c )
|
zipdir.c )
|
||||||
target_link_libraries( zipdir ${ZLIB_LIBRARIES} bzip2 lzma )
|
target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} lzma )
|
||||||
|
|
Loading…
Reference in a new issue