[vlc-devel] commit: cmake: Define HAVE_ATTRIBUTE_PACKED if needed. (Pierre d'Herbemont )

git version control git at videolan.org
Sun May 4 17:11:36 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun May  4 17:00:24 2008 +0200| [bf52311992e0411a26fec5ae19d254308e122058]

cmake: Define HAVE_ATTRIBUTE_PACKED if needed.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf52311992e0411a26fec5ae19d254308e122058
---

 extras/buildsystem/cmake/include/config.cmake |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/extras/buildsystem/cmake/include/config.cmake b/extras/buildsystem/cmake/include/config.cmake
index 920fad4..d7f9fc2 100644
--- a/extras/buildsystem/cmake/include/config.cmake
+++ b/extras/buildsystem/cmake/include/config.cmake
@@ -98,6 +98,10 @@ endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
 set( HAVE_DYNAMIC_PLUGINS ${ENABLE_DYNAMIC_PLUGINS})
 set( LIBEXT ${CMAKE_SHARED_MODULE_SUFFIX})
 
+check_c_source_compiles(
+    "struct __attribute__((__packed__)) foo { int a; } b; int main(){return 0;}"
+    HAVE_ATTRIBUTE_PACKED)
+
 ###########################################################
 # Headers checks
 ###########################################################




More information about the vlc-devel mailing list