Fix a compilation error with cmake.

When the game is disabled from the command line the unit tests no
longer compiled. When using cmake normally the game is automatically
enabled and disabling it afterwards doesn't introduce the bug.
This commit is contained in:
Mark de Wever 2011-04-25 07:19:22 +00:00
parent 4d06ca4cac
commit e398b69bf8

View file

@ -189,6 +189,13 @@ endif(ENABLE_TOOLS OR ENABLE_GAME OR ENABLE_TESTS)
if(ENABLE_GAME OR ENABLE_TESTS)
find_package( SDL_mixer 1.2 REQUIRED )
find_package( SDL_ttf 2.0.8 REQUIRED )
if(NOT MSVC)
find_package( PkgConfig REQUIRED )
pkg_check_modules( PANGOCAIRO REQUIRED pangocairo>=1.14.8 )
pkg_check_modules( FONTCONFIG REQUIRED fontconfig>=2.4.1 )
endif(NOT MSVC)
endif(ENABLE_GAME OR ENABLE_TESTS)
if(ENABLE_GAME OR ENABLE_SERVER OR ENABLE_CAMPAIGN_SERVER OR ENABLE_TESTS)
find_package( SDL_net REQUIRED )
@ -201,12 +208,6 @@ if(ENABLE_TESTS)
find_package( Boost 1.35 REQUIRED COMPONENTS unit_test_framework )
endif(ENABLE_TESTS)
if(ENABLE_GAME)
if(NOT MSVC)
find_package( PkgConfig REQUIRED )
pkg_check_modules( PANGOCAIRO REQUIRED pangocairo>=1.14.8 )
pkg_check_modules( FONTCONFIG REQUIRED fontconfig>=2.4.1 )
endif(NOT MSVC)
find_package( FriBiDi )
if(ENABLE_FRIBIDI AND FRIBIDI_LIBRARIES)
add_definitions(-DHAVE_FRIBIDI)