include(ConfigureChecks.cmake)
-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})
+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 )
--- /dev/null
+@echo off\r
+goto beginning\r
+ *\r
+ * It is what it is, you can do with it as you please.\r
+ *\r
+ * Just don't blame me if it teaches your computer to smoke!\r
+ *\r
+ * -Enjoy\r
+ * fh :)_~\r
+ *\r
+:beginning\r
+if /i "%1#" == "--libs#" goto doit\r
+if /i "%1#" == "--cflags#" goto doit\r
+if /i "%1#" == "--version#" goto doit\r
+if /i "%1#" == "--prefix#" goto doit\r
+\r
+echo "usage: %0 [OPTIONS]"\r
+echo [--libs]\r
+echo [--cflags]\r
+echo [--version]\r
+echo [--prefix]\r
+goto theend\r
+\r
+ *\r
+ * NOTE: Windows does not assume libraries are prefixed with 'lib'.\r
+ * NOTE: If '-llibtag' is the last element, it is easily appended in the users installation/makefile process\r
+ * to allow for static, shared or debug builds.\r
+ * It would be preferable if the top level CMakeLists.txt provided the library name during config. ??\r
+:doit\r
+if /i "%1#" == "--libs#" echo -L${LIB_INSTALL_DIR} -llibtag\r
+if /i "%1#" == "--cflags#" echo -I${INCLUDE_INSTALL_DIR}/taglib\r
+if /i "%1#" == "--version#" echo ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}\r
+if /i "%1#" == "--prefix#" echo ${CMAKE_INSTALL_PREFIX}\r
+\r
+:theend\r
+\r