diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-05-23 13:00:58 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-05-23 13:00:58 +0000 |
commit | 41e165cc8feebe6e4701f997c80e7722dd7c990c (patch) | |
tree | 5cd37f6bab3b17d6bfdedf8b1af72973050b7dda /cmake | |
parent | 41d9d2ab62bc125ba6f56b988be1cc1b7e274aed (diff) | |
download | usdx-41e165cc8feebe6e4701f997c80e7722dd7c990c.tar.gz usdx-41e165cc8feebe6e4701f997c80e7722dd7c990c.tar.xz usdx-41e165cc8feebe6e4701f997c80e7722dd7c990c.zip |
cmake branch should work again with current trunk
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2405 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 42 | ||||
-rw-r--r-- | cmake/src/CMakeLists.txt | 2 |
2 files changed, 31 insertions, 13 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e8a354a9..a4e97d77 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -52,13 +52,22 @@ include(FileUtils) # LIBRARIES ## +# for some reason pkg_check_modules does not quit the configuration +# phase if REQUIRED is specified and the module is not found. +function(pkg_check_required_modules prefix modules) + pkg_check_modules(${prefix} REQUIRED ${modules}) + if(NOT ${prefix}_FOUND) + message(FATAL_ERROR "A required module is not available. Install it and try again.") + endif(NOT ${prefix}_FOUND) +endfunction(pkg_check_required_modules) + if(NOT WIN32) find_package(PkgConfig REQUIRED) #find_package(OpenGL) - #pkg_check_modules(opengl REQUIRED gl) + #pkg_check_required_modules(opengl gl) - pkg_check_modules(sdl REQUIRED sdl) + pkg_check_required_modules(sdl sdl) #find_package(SDL REQUIRED) # find SDL_image @@ -72,11 +81,11 @@ if(NOT WIN32) # hide SDL_image from GUI mark_as_advanced(SDLIMAGE_LIBRARY SDLIMAGE_INCLUDE_DIR) - pkg_check_modules(libpng REQUIRED libpng12) + pkg_check_required_modules(libpng libpng12) #find_package(PNG REQUIRED) - pkg_check_modules(freetype REQUIRED freetype2) + pkg_check_required_modules(freetype freetype2) #find_package(Freetype REQUIRED) - pkg_check_modules(sqlite3 REQUIRED sqlite3) + pkg_check_required_modules(sqlite3 sqlite3) # find FFMpeg # Note: do not use the min/max version parameters with ffmpeg @@ -86,11 +95,11 @@ if(NOT WIN32) # A check for version >=52.0.0 will return version 0d.51.1.2 # although it is lower because pkg-config is confused by the 0d. # Use ${libav...}_VERSION_INT for version-checking instead - pkg_check_modules(libavcodec REQUIRED libavcodec) + pkg_check_required_modules(libavcodec libavcodec) expand_version(libavcodec_VERSION) - pkg_check_modules(libavformat REQUIRED libavformat) + pkg_check_required_modules(libavformat libavformat) expand_version(libavformat_VERSION) - pkg_check_modules(libavutil REQUIRED libavutil) + pkg_check_required_modules(libavutil libavutil) expand_version(libavutil_VERSION) set(ffmpeg_FOUND TRUE) @@ -121,11 +130,21 @@ if(NOT WIN32) expand_version(libprojectM_VERSION) # find portaudio - pkg_check_modules(portaudio REQUIRED portaudio-2.0) + pkg_check_required_modules(portaudio portaudio-2.0) expand_version(portaudio_VERSION) # find portmixer pkg_check_modules(portmixer portmixer) + + # find lua 5.1 + # (K)Ubuntu uses lua5.1.pc, Mac OS X and other + # linux distributions use lua.pc + pkg_check_modules(lua lua5.1) + set(lua_LIB_NAME "lua5.1") + if(NOT lua_FOUND) + pkg_check_required_modules(lua "lua >= 5.1") + set(lua_LIB_NAME "lua") + endif(NOT lua_FOUND) endif(NOT WIN32) ## @@ -154,7 +173,6 @@ endif(NOT WIN32) ## add_subdirectory(src) -add_subdirectory(plugins) macro(add_configuration_target target build_type) ADD_CUSTOM_TARGET(${target} @@ -200,7 +218,7 @@ install( ) #if(APPLE) - include(MacOSXBundle) +# include(MacOSXBundle) #endif(APPLE) # add "uninstall" target @@ -265,7 +283,6 @@ set(CPACK_SOURCE_IGNORE_FILES "CMakeCache\\\\.txt$" "^${PROJECT_SOURCE_DIR}/[^/]*\\\\.cmake$" "^${PROJECT_SOURCE_DIR}/src/.*\\\\.cmake$" - "^${PROJECT_SOURCE_DIR}/plugins/.*\\\\.cmake$" "^${PROJECT_SOURCE_DIR}/game/ultrastardx$" "^${PROJECT_SOURCE_DIR}/src/paths\\\\.inc$" "^${PROJECT_SOURCE_DIR}/src/config-[^w].*\\\\.inc$" @@ -281,6 +298,7 @@ include(CPack) # SUMMARY ## + message(" !! Configuration of ${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} done! !! diff --git a/cmake/src/CMakeLists.txt b/cmake/src/CMakeLists.txt index df0006d3..ca9b11be 100644 --- a/cmake/src/CMakeLists.txt +++ b/cmake/src/CMakeLists.txt @@ -73,8 +73,8 @@ pascal_add_module(ultrastardx ultrastardx.dpr media/*.pas menu/*.pas screens/*.pas + lua/*.pas lib/other/*.pas - ../plugins/SDK/*.pas INCLUDES ${usdx_includes} PACKAGES ${usdx_packages} DEPENDS ${usdx_depends} |