Win32 taglib-config.cmd support
Festus Hagen
festushagenlists at yahoo.com
Mon Sep 10 20:30:05 UTC 2012
Hi all,
Win32 supported taglib-config.
Can something like the following be added to taglib ??
(I won't complain if my humor is omitted)
I use Yahoo's web mail so the following paste is a mess, however I have included it as an Attachment as well.
The diff is against taglib-1.8.
diff -a -u -w -r -B -N --strip-trailing-cr Orig Modded
diff -a -u -w -r -B -N --strip-trailing-cr Orig/CMakeLists.txt Modded/CMakeLists.txt
--- Orig/CMakeLists.txt 2012-09-06 14:03:15.000000000 -0400
+++ Modded/CMakeLists.txt 2012-09-09 12:39:49.000000000 -0400
@@ -66,8 +66,15 @@
include(ConfigureChecks.cmake)
+if(NOT WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib-config )
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/taglib-config DESTINATION ${BIN_INSTALL_DIR})
+endif()
+
+if(WIN32)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmd.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib-config.cmd )
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/taglib-config.cmd DESTINATION ${BIN_INSTALL_DIR})
+endif()
if(NOT WIN32 AND NOT BUILD_FRAMEWORK)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc )
diff -a -u -w -r -B -N --strip-trailing-cr Orig/taglib-config.cmd.cmake Modded/taglib-config.cmd.cmake
--- Orig/taglib-config.cmd.cmake 1969-12-31 19:00:00.000000000 -0500
+++ Modded/taglib-config.cmd.cmake 2012-09-09 15:18:28.000000000 -0400
@@ -0,0 +1,35 @@
+ at echo off
+rem *
+rem * It is what it is, you can do with it as you please.
+rem *
+rem * Just don't blame me if it teaches your computer to smoke!
+rem *
+rem * -Enjoy
+rem * fh :)_~
+rem *
+
+if "%1#" == "--libs#" goto doit
+if "%1#" == "--cflags#" goto doit
+if "%1#" == "--version#" goto doit
+if "%1#" == "--prefix#" goto doit
+
+echo "usage: %0 [OPTIONS]"
+echo [--libs]
+echo [--cflags]
+echo [--version]
+echo [--prefix]
+goto theend
+
+:doit
+rem * NOTE: Windows does not assume libraries are prefixed with 'lib'.
+rem * NOTE: '-llibtag' must remain the last element of libs.
+rem * Thus users applications makefiles can easily append '.dll' for shared builds, or
+rem * leave as is for static builds.
+rem * Is there a better way ???
+if "%1#" == "--libs#" echo -L${LIB_INSTALL_DIR} -llibtag
+if "%1#" == "--cflags#" echo -I${INCLUDE_INSTALL_DIR}/taglib
+if "%1#" == "--version#" echo ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
+if "%1#" == "--prefix#" echo ${CMAKE_INSTALL_PREFIX}
+
+:theend
+
Thanks y'all for doing what ya do!
-Enjoy
fh :)_~
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Taglib-1.8_Win32_taglib-config.cmd_Dif.txt
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20120910/0a0dcf93/attachment.txt>
More information about the taglib-devel
mailing list