From: <el...@us...> - 2012-01-24 22:54:06
|
Revision: 15208 http://alleg.svn.sourceforge.net/alleg/?rev=15208&view=rev Author: elias Date: 2012-01-24 22:53:59 +0000 (Tue, 24 Jan 2012) Log Message: ----------- Renamed the library name of the native dialogs addon to match its header. Started simplifying the addon build process - by using consistent naming we could make it much easier for addon authors to include the addon into the cmake build. Also required if we want a monolith build. Modified Paths: -------------- allegro/branches/5.1/addons/acodec/CMakeLists.txt allegro/branches/5.1/addons/audio/CMakeLists.txt allegro/branches/5.1/addons/color/CMakeLists.txt allegro/branches/5.1/addons/font/CMakeLists.txt allegro/branches/5.1/addons/image/CMakeLists.txt allegro/branches/5.1/addons/main/CMakeLists.txt allegro/branches/5.1/addons/memfile/CMakeLists.txt allegro/branches/5.1/addons/native_dialog/CMakeLists.txt allegro/branches/5.1/addons/physfs/CMakeLists.txt allegro/branches/5.1/addons/primitives/CMakeLists.txt allegro/branches/5.1/addons/shader/CMakeLists.txt allegro/branches/5.1/addons/ttf/CMakeLists.txt allegro/branches/5.1/addons/video/CMakeLists.txt allegro/branches/5.1/cmake/Common.cmake Modified: allegro/branches/5.1/addons/acodec/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/acodec/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/acodec/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -269,8 +269,8 @@ install_our_library(allegro_acodec) install_our_headers(${ACODEC_INCLUDE_FILES}) -set(ACODEC_LINK_WITH allegro_acodec PARENT_SCOPE) -set(SUPPORT_ACODEC 1 PARENT_SCOPE) +add_addon(acodec) + #-----------------------------------------------------------------------------# # vim: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/audio/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/audio/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/audio/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -67,8 +67,8 @@ set(ALLEGRO_CFG_KCM_PULSEAUDIO 1) list(APPEND AUDIO_SOURCES pulseaudio.c) list(APPEND AUDIO_LIBRARIES ${PULSEAUDIO_LIBRARIES}) - include_directories(SYSTEM ${PULSEAUDIO_INCLUDE_DIRS}) - link_directories(${PULSEAUDIO_LIBRARY_DIRS}) + list(APPEND AUDIO_INCLUDE_DIRECTORIES ${PULSEAUDIO_INCLUDE_DIRS}) + list(APPEND AUDIO_LINK_DIRECTORIES ${PULSEAUDIO_LIBRARY_DIRS}) set(SUPPORT_AUDIO 1) endif(SUPPORT_PULSEAUDIO) @@ -83,7 +83,7 @@ set(ALLEGRO_CFG_KCM_ALSA 1) list(APPEND AUDIO_SOURCES alsa.c) list(APPEND AUDIO_LIBRARIES ${ALSA_LIBRARIES}) - include_directories(SYSTEM ${ALSA_INCLUDE_DIRS}) + list(APPEND AUDIO_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS}) set(SUPPORT_AUDIO 1) endif(SUPPORT_ALSA) @@ -98,7 +98,7 @@ set(ALLEGRO_CFG_KCM_DSOUND 1) list(APPEND AUDIO_SOURCES dsound.cpp) list(APPEND AUDIO_LIBRARIES ${DSOUND_LIBRARIES}) - include_directories(SYSTEM ${DSOUND_INCLUDE_DIR}) + list(APPEND AUDIO_INCLUDE_DIRECTORIES ${DSOUND_INCLUDE_DIR}) set(SUPPORT_AUDIO 1) endif(SUPPORT_DSOUND) @@ -136,7 +136,7 @@ set(ALLEGRO_CFG_KCM_OPENAL 1) list(APPEND AUDIO_SOURCES openal.c) list(APPEND AUDIO_LIBRARIES ${OPENAL_LIBRARY}) - include_directories(SYSTEM ${OPENAL_INCLUDE_DIR}) + list(APPEND AUDIO_INCLUDE_DIRECTORIES ${OPENAL_INCLUDE_DIR}) set(SUPPORT_AUDIO 1) endif(SUPPORT_OPENAL) @@ -150,9 +150,8 @@ return() endif(NOT SUPPORT_AUDIO) -# Let examples know that audio is supported. -set(SUPPORT_AUDIO 1 PARENT_SCOPE) - +include_directories(SYSTEM ${AUDIO_INCLUDE_DIRECTORIES}) +link_directories(${AUDIO_LINK_DIRECTORIES}) add_our_library(allegro_audio "${AUDIO_SOURCES};${AUDIO_INCLUDE_FILES}" "-DALLEGRO_KCM_AUDIO_SRC" @@ -164,7 +163,7 @@ install_our_library(allegro_audio) install_our_headers(${AUDIO_INCLUDE_FILES}) -set(AUDIO_LINK_WITH allegro_audio PARENT_SCOPE) +add_addon(audio) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/color/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/color/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/color/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -17,7 +17,7 @@ install_our_library(allegro_color) install_our_headers(${COLOR_INCLUDE_FILES}) -set(COLOR_LINK_WITH allegro_color PARENT_SCOPE) +add_addon(color) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/font/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/font/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/font/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -15,7 +15,7 @@ install_our_library(allegro_font) install_our_headers(${FONT_INCLUDE_FILES}) -set(FONT_LINK_WITH allegro_font PARENT_SCOPE) +add_addon(font) #-----------------------------------------------------------------------------# # vim: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/image/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/image/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/image/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -151,7 +151,7 @@ install_our_library(allegro_image) install_our_headers(${IMAGE_INCLUDE_FILES}) -set(IMAGE_LINK_WITH allegro_image PARENT_SCOPE) +add_addon(image) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/main/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/main/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/main/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -18,7 +18,6 @@ install_our_library(allegro_main) -set(SUPPORT_ALLEGRO_MAIN 1 PARENT_SCOPE) -set(ALLEGRO_MAIN_LINK_WITH allegro_main PARENT_SCOPE) +add_addon(main) # vim: set sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/memfile/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/memfile/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/memfile/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -16,7 +16,7 @@ install_our_library(allegro_memfile) install_our_headers(${MEMFILE_INCLUDE_FILES}) -set(MEMFILE_LINK_WITH allegro_memfile PARENT_SCOPE) +add_addon(memfile) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/native_dialog/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/native_dialog/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/native_dialog/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -1,27 +1,27 @@ -set(DIALOG_INCLUDE_FILES allegro5/allegro_native_dialog.h) +set(NATIVE_DIALOG_INCLUDE_FILES allegro5/allegro_native_dialog.h) -set_our_header_properties(${DIALOG_INCLUDE_FILES}) +set_our_header_properties(${NATIVE_DIALOG_INCLUDE_FILES}) -set(DIALOG_SOURCES +set(NATIVE_DIALOG_SOURCES dialog.c textlog.c menu.c ) if(APPLE AND NOT IPHONE) - list(APPEND DIALOG_SOURCES osx_dialog.m) + list(APPEND NATIVE_DIALOG_SOURCES osx_dialog.m) set(ALLEGRO_CFG_NATIVE_DIALOG_OSX 1) set(SUPPORT_NATIVE_DIALOG 1) endif(APPLE AND NOT IPHONE) if(APPLE AND IPHONE) - list(APPEND DIALOG_SOURCES iphone_dialog.m) + list(APPEND NATIVE_DIALOG_SOURCES iphone_dialog.m) set(ALLEGRO_CFG_NATIVE_DIALOG_IPHONE 1) set(SUPPORT_NATIVE_DIALOG 1) endif(APPLE AND IPHONE) if(WIN32) - list(APPEND DIALOG_SOURCES win_dialog.c) + list(APPEND NATIVE_DIALOG_SOURCES win_dialog.c) set(ALLEGRO_CFG_NATIVE_DIALOG_WINDOWS 1) set(SUPPORT_NATIVE_DIALOG 1) endif(WIN32) @@ -30,8 +30,8 @@ pkg_check_modules(GTK gtk+-2.0) pkg_check_modules(GT gthread-2.0) if(GTK_FOUND AND GT_FOUND) - list(APPEND DIALOG_SOURCES gtk_dialog.c) - include_directories(SYSTEM ${GTK_INCLUDE_DIRS}) + list(APPEND NATIVE_DIALOG_SOURCES gtk_dialog.c) + list(APPEND NATIVE_DIALOG_INCLUDE_DIRECTORIES ${GTK_INCLUDE_DIRS}) # For example, on Windows, GTK+ requires gcc -mms-bitfields (MinGW). foreach(arg ${GTK_CFLAGS}) @@ -62,20 +62,21 @@ allegro5/internal/aintern_native_dialog_cfg.h.cmake ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_native_dialog_cfg.h ) + + include_directories(SYSTEM ${NATIVE_DIALOG_INCLUDE_DIRECTORIES}) - add_our_library(allegro_dialog - "${DIALOG_SOURCES};${DIALOG_INCLUDE_FILES}" + add_our_library(allegro_native_dialog + "${NATIVE_DIALOG_SOURCES};${NATIVE_DIALOG_INCLUDE_FILES}" "-DALLEGRO_NATIVE_DIALOG_SRC" "${NATIVE_DIALOG_LIBRARIES};${ALLEGRO_LINK_WITH}" ) - set_our_framework_properties(allegro_dialog AllegroDialog-${ALLEGRO_SOVERSION}) + set_our_framework_properties(allegro_native_dialog AllegroDialog-${ALLEGRO_SOVERSION}) - install_our_library(allegro_dialog) - install_our_headers(${DIALOG_INCLUDE_FILES}) + install_our_library(allegro_native_dialog) + install_our_headers(${NATIVE_DIALOG_INCLUDE_FILES}) - set(SUPPORT_NATIVE_DIALOG 1 PARENT_SCOPE) - set(NATIVE_DIALOG_LINK_WITH allegro_dialog PARENT_SCOPE) + add_addon(native_dialog) endif(SUPPORT_NATIVE_DIALOG) # vim: set sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/physfs/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/physfs/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/physfs/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -17,7 +17,7 @@ install_our_library(allegro_physfs) install_our_headers(${PHYSFS_INCLUDE_FILES}) -set(PHYSFS_LINK_WITH allegro_physfs PARENT_SCOPE) +add_addon(physfs) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/primitives/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/primitives/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/primitives/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -28,7 +28,7 @@ install_our_library(allegro_primitives) install_our_headers(${PRIMITIVES_INCLUDE_FILES}) -set(PRIMITIVES_LINK_WITH allegro_primitives PARENT_SCOPE) +add_addon(primitives) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/shader/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/shader/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/shader/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -74,6 +74,6 @@ install_our_library(allegro_shader) install_our_headers(${SHADER_INCLUDE_FILES}) -set(SHADER_LINK_WITH allegro_shader PARENT_SCOPE) +add_addon(shader) # vim: set sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/ttf/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/ttf/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/ttf/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -12,17 +12,20 @@ ${CMAKE_BINARY_DIR}/include/allegro5/internal/aintern_ttf_cfg.h ) +set(TTF_LIBRARIES ${FREETYPE_LIBRARIES}) +set(TTF_INCLUDE_DIRECTORIES ${FREETYPE_INCLUDE_DIRS}) + # FREETYPE_LIBRARIES should include zlib automatically if statically linking, # but it doesn't. find_package(ZLIB) if(ZLIB_FOUND AND NOT IPHONE) - list(APPEND FREETYPE_LIBRARIES ${ZLIB_LIBRARIES}) + list(APPEND TTF_LIBRARIES ${ZLIB_LIBRARIES}) endif() add_our_library(allegro_ttf "${TTF_SOURCES};${TTF_INCLUDE_FILES}" "-DALLEGRO_TTF_SRC" - "${FONT_LINK_WITH};${FREETYPE_LIBRARIES}" + "${FONT_LINK_WITH};${TTF_LIBRARIES}" ) set_our_framework_properties(allegro_ttf AllegroTTF-${ALLEGRO_SOVERSION}) @@ -30,7 +33,7 @@ install_our_library(allegro_ttf) install_our_headers(${TTF_INCLUDE_FILES}) -set(TTF_LINK_WITH allegro_ttf PARENT_SCOPE) +add_addon(ttf) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/addons/video/CMakeLists.txt =================================================================== --- allegro/branches/5.1/addons/video/CMakeLists.txt 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/addons/video/CMakeLists.txt 2012-01-24 22:53:59 UTC (rev 15208) @@ -50,9 +50,6 @@ return() endif(NOT SUPPORT_VIDEO) -# Let examples know that video is supported. -set(SUPPORT_VIDEO 1 PARENT_SCOPE) - add_our_library(allegro_video "${VIDEO_SOURCES};${VIDEO_INCLUDE_FILES}" "-DALLEGRO_VIDEO_SRC" @@ -64,7 +61,7 @@ install_our_library(allegro_video) install_our_headers(${VIDEO_INCLUDE_FILES}) -set(VIDEO_LINK_WITH allegro_video PARENT_SCOPE) +add_addon(video) #-----------------------------------------------------------------------------# # vi: set ts=8 sts=4 sw=4 et: Modified: allegro/branches/5.1/cmake/Common.cmake =================================================================== --- allegro/branches/5.1/cmake/Common.cmake 2012-01-24 19:47:53 UTC (rev 15207) +++ allegro/branches/5.1/cmake/Common.cmake 2012-01-24 22:53:59 UTC (rev 15208) @@ -195,7 +195,6 @@ # specified, we assume an implied C source file. # # Free variable: EXECUTABLE_TYPE -# function(add_our_executable nm) set(srcs) set(libs) @@ -284,5 +283,11 @@ endforeach(file) endfunction(copy_data_dir_to_build) +macro(add_addon addon) + string(TOUPPER ${addon} ADDON) + set(SUPPORT_${ADDON} 1 PARENT_SCOPE) + set(${ADDON}_LINK_WITH allegro_${addon} PARENT_SCOPE) +endmacro(add_addon) + #-----------------------------------------------------------------------------# # vim: set ft=cmake sts=4 sw=4 et: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |