commit 17873c6a54272e19b7818c1a4636d507a0e3872d
Author: Maia Kozheva <[email protected]>
Date: Mon Dec 21 11:04:52 2009 +0600
Added CMake build files
CMakeLists.txt | 43 +++++++++++++++++++++++++++++
cmake/FindGTK2.cmake | 14 +++++++++
cmake/FindGlade.cmake | 7 +++++
cmake/FindLibgpod.cmake | 7 +++++
cmake/config.h.in | 68 +++++++++++++++++++++++++++++++++++++++++++++++
cmake/sources.cmake | 53 ++++++++++++++++++++++++++++++++++++
6 files changed, 192 insertions(+), 0 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..c960549
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,43 @@
+message("-------------------------------------------")
+message("Configuration started")
+message("-------------------------------------------")
+project(gtkpod)
+cmake_minimum_required(VERSION 2.6)
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
+
+set(PACKAGE ${CMAKE_PROJECT_NAME})
+set(GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
+
+find_package(PkgConfig REQUIRED)
+find_package(GTK2 REQUIRED)
+find_package(Glade REQUIRED)
+find_package(LibXml2 REQUIRED)
+find_package(Libgpod REQUIRED)
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR}
+ ${GTK2_ALL_INCLUDES}
+ ${LIBXML2_INCLUDE_DIR}
+ ${GLADE2_INCLUDE_DIRS}
+ ${LIBGPOD_INCLUDE_DIRS}
+)
+
+add_definitions(
+ ${GTK2_ALL_CFLAGS}
+ ${LIBXML2_DEFINITIONS}
+ ${GLADE2_CFLAGS_OTHER}
+ ${LIBGPOD_CFLAGS_OTHER}
+ -DHAVE_CONFIG_H
+)
+
+configure_file(${CMAKE_SOURCE_DIR}/cmake/config.h.in
+ ${CMAKE_BINARY_DIR}/config.h)
+
+include(cmake/sources.cmake)
+add_executable(gtkpod ${GTKPOD_SOURCES})
+
+target_link_libraries(gtkpod
+ ${GTK2_ALL_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${GLADE2_LDFLAGS}
+ ${LIBGPOD_LDFLAGS}
+)
diff --git a/cmake/FindGTK2.cmake b/cmake/FindGTK2.cmake
new file mode 100644
index 0000000..96f2465
--- /dev/null
+++ b/cmake/FindGTK2.cmake
@@ -0,0 +1,14 @@
+set(GLIB_REQUIRED_VERSION 2.15)
+set(GTK_REQUIRED_VERSION 2.12)
+message("-- Checking for Glib >= ${GLIB_REQUIRED_VERSION}...")
+pkg_check_modules(GLIB2 glib-2.0>=${GLIB_REQUIRED_VERSION})
+message("-- Checking for GTK+ >= ${GTK_REQUIRED_VERSION}...")
+pkg_check_modules(GTK2 gtk+-2.0>=${GTK_REQUIRED_VERSION})
+
+if(GLIB2_FOUND AND GTK2_FOUND)
+ set(GTK2_ALL_INCLUDES ${GLIB2_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS})
+ set(GTK2_ALL_CFLAGS ${GLIB2_CFLAGS_OTHER} ${GTK2_CFLAGS_OTHER})
+ set(GTK2_ALL_LIBS ${GLIB2_LDFLAGS} ${GTK2_LDFLAGS})
+else()
+ message(FATAL_ERROR "Glib/GTK+ not found")
+endif()
diff --git a/cmake/FindGlade.cmake b/cmake/FindGlade.cmake
new file mode 100644
index 0000000..3454670
--- /dev/null
+++ b/cmake/FindGlade.cmake
@@ -0,0 +1,7 @@
+set(GLADE_REQUIRED_VERSION 2.4.0)
+message("-- Checking for libglade >= ${GLADE_REQUIRED_VERSION}...")
+pkg_check_modules(GLADE2 libglade-2.0>=${GLADE_REQUIRED_VERSION})
+
+if(NOT GLADE2_FOUND)
+ message(FATAL_ERROR "libglade not found")
+endif()
diff --git a/cmake/FindLibgpod.cmake b/cmake/FindLibgpod.cmake
new file mode 100644
index 0000000..239f47a
--- /dev/null
+++ b/cmake/FindLibgpod.cmake
@@ -0,0 +1,7 @@
+set(LIBGPOD_REQUIRED_VERSION 0.7.0)
+message("-- Checking for libgpod >= ${LIBGPOD_REQUIRED_VERSION}...")
+pkg_check_modules(LIBGPOD libgpod-1.0>=${LIBGPOD_REQUIRED_VERSION})
+
+if(NOT LIBGPOD_FOUND)
+ message(FATAL_ERROR "libgpod not found")
+endif()
diff --git a/cmake/config.h.in b/cmake/config.h.in
new file mode 100644
index 0000000..8fb06f3
--- /dev/null
+++ b/cmake/config.h.in
@@ -0,0 +1,68 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* always defined to indicate that i18n is enabled */
+#cmakedefine ENABLE_NLS
+
+/* "Gettext package name" */
+#cmakedefine GETTEXT_PACKAGE @GETTEXT_PACKAGE@
+
+/* Define if you have curl support */
+#cmakedefine HAVE_CURL
+
+/* Define if you have the flac library */
+#cmakedefine HAVE_FLAC
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#cmakedefine HAVE_GETOPT_LONG_ONLY
+
+/* Define if you have gnome-vfs support */
+#cmakedefine HAVE_GNOME_VFS
+
+/* Define if you have HAL support */
+#cmakedefine HAVE_HAL
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H
+
+/* Define if you have the ogg/vorbis library */
+#cmakedefine HAVE_LIBVORBISFILE
+
+/* Define to 1 if you have the `statvfs' function. */
+#cmakedefine HAVE_STATVFS
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Set this to the libgpod version */
+#cmakedefine LIBGPOD_VERSION @LIBGPOD_VERSION@
+
+/* Name of package */
+#cmakedefine PACKAGE @CMAKE_PROJECT_NAME@
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#cmakedefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#cmakedefine PACKAGE_URL
+
+/* Define to the version of this package. */
+#cmakedefine PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#cmakedefine VERSION
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#cmakedefine YYTEXT_POINTER
diff --git a/cmake/sources.cmake b/cmake/sources.cmake
new file mode 100644
index 0000000..650278a
--- /dev/null
+++ b/cmake/sources.cmake
@@ -0,0 +1,53 @@
+set(GTKPOD_SOURCES
+ src/autodetection.c
+ src/charset.c
+ src/clientserver.c
+ src/confirmation.c
+ src/context_menus.c
+ src/details.c
+ src/display.c
+ src/display_coverart.c
+ src/display_itdb.c
+ src/display_photo.c
+ src/display_playlists.c
+ src/display_sorttabs.c
+ src/display_spl.c
+ src/display_tracks.c
+ src/fetchcover.c
+ src/file.c
+ src/file_convert.c
+ src/file_export.c
+ src/file_itunesdb.c
+ src/fileselection.c
+ src/flacfile.c
+ src/getopt1.c
+ src/getopt.c
+ src/help.c
+ src/info.c
+ src/infodlg.c
+ src/ipod_init.c
+ src/main.c
+ src/md5.c
+ src/misc.c
+ src/misc_confirm.c
+ src/misc_conversion.c
+ src/misc_input.c
+ src/misc_playlist.c
+ src/misc_track.c
+ src/mp3file.c
+ src/mp4file.c
+ src/oggfile.c
+ src/podcast.c
+ src/prefs.c
+ src/prefsdlg.c
+ src/rb_cell_renderer_rating.c
+ src/rb_rating_helper.c
+ src/repository.c
+ src/sha1.c
+ src/sort_window.c
+ src/stock_icons.c
+ src/support.c
+ src/syncdir.c
+ src/tools.c
+ src/wavfile.c
+)
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2