]> granicus.if.org Git - libjpeg-turbo/commitdiff
Visual C++ libraries can't be made to work with MinGW because of the dependency on...
authorDRC <dcommander@users.sourceforge.net>
Wed, 24 Feb 2010 07:24:26 +0000 (07:24 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 24 Feb 2010 07:24:26 +0000 (07:24 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@151 632fc199-4ca6-4c93-a231-07263d6284db

BUILDING.txt
Makefile.am
README-turbo.txt
release/libjpeg-turbo.nsi
win/Makefile

index 9611766746e02d839fa68ebd06bb5f223b0dae29..a3cea30a89cccc0b829c6fdbee028b902926f73a 100644 (file)
@@ -293,8 +293,14 @@ make udmg
   later, whereas the 64-bit fork is compatible with OS X 10.6 and later.  OS X
   10.4 compatibility SDK required.
 
+make nsi
+
+  When using MinGW, this creates a Win32 installer for the GCC version of the
+  libjpeg-turbo SDK.  This requires the Nullsoft Install System
+  (http://nsis.sourceforge.net/.)  makensis.exe should be in your PATH.
+
 make -f win/Makefile dist
 
-  This creates a Win32 installer for the libjpeg-turbo SDK.  This requires the
-  Nullsoft Install System (http://nsis.sourceforge.net/.)  makensis.exe should
-  be in your PATH.
+  This creates a Win32 installer for the Visual C++ version of the
+  libjpeg-turbo SDK.  This requires the Nullsoft Install System
+  (http://nsis.sourceforge.net/.)  makensis.exe should be in your PATH.
index 08dc1b37d440964b2da7774d6654585929227985..407ed58dc2787090c4d27d9da44fc8fa0f099929 100644 (file)
@@ -164,3 +164,8 @@ sunpkg: all
                ${DEBARCH} ${srcdir} $(CC) $(CXX)
 
 endif
+
+nsi: all
+       makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo-gcc \
+               -DWLIBDIR=.libs -DWSRCDIR=$(srcdir) -DWBLDDIR=. -DWHDRDIR=. \
+               -DPLATFORM="GCC" -DGCC $(srcdir)/release/libjpeg-turbo.nsi
index ccf7d7ef55bc7a0d48618e20d8db5c2fd7d99bfe..684f9f4cda7533bf91842e46568e4cb76355bf58 100755 (executable)
@@ -117,23 +117,34 @@ of libjpeg by setting
 
 ({lib} = lib, lib32, lib64, or lib/amd64, as appropriate.)
 
-This is useful, for instance, if you want to build an application that
-leverages the libjpeg-turbo colorspace extensions (see below.)  On Linux and
-Solaris systems, you would still need to manipulate the LD_LIBRARY_PATH or sym
-links appropriately to use libjpeg-turbo at run time.  On such systems, you can
-pass -R /opt/libjpeg-turbo/{lib} to the linker to force the use of
-libjpeg-turbo at run time rather than libjpeg (also useful if you want to
-leverage the colorspace extensions), or you can link against the libjpeg-turbo
-static library.
-
-To force a Linux or Solaris application to link against the static version of
-libjpeg-turbo, you can use the following linker options:
+If using Cygwin, then set
+
+  CPATH=/cygdrive/c/libjpeg-turbo-gcc/include
+  and
+  LIBRARY_PATH=/cygdrive/c/libjpeg-turbo-gcc/lib
+
+If using MinGW, then set
+
+  CPATH=/c/libjpeg-turbo-gcc/include
+  and
+  LIBRARY_PATH=/c/libjpeg-turbo-gcc/lib
+
+Building against libjpeg-turbo is useful, for instance, if you want to build an
+application that leverages the libjpeg-turbo colorspace extensions (see below.)
+On Linux and Solaris systems, you would still need to manipulate the
+LD_LIBRARY_PATH or sym links appropriately to use libjpeg-turbo at run time.
+On such systems, you can pass -R /opt/libjpeg-turbo/{lib} to the linker to
+force the use of libjpeg-turbo at run time rather than libjpeg (also useful if
+you want to leverage the colorspace extensions), or you can link against the
+libjpeg-turbo static library.
+
+To force a Linux, Solaris, or MinGW application to link against the static
+version of libjpeg-turbo, you can use the following linker options:
 
   -Wl,-Bstatic -ljpeg -Wl,-Bdynamic
 
-or you can simply add /opt/libjpeg-turbo/{lib}/libjpeg.a to the linker command
-line (the latter is the only way to link against the static version of
-libjpeg-turbo on OS X.)
+On OS X, simply add /opt/libjpeg-turbo/{lib}/libjpeg.a to the linker command
+line (this also works on Linux and Solaris.)
 
 To build Visual C++ applications using libjpeg-turbo, add
 c:\libjpeg-turbo\include to your system or user INCLUDE environment variable
@@ -141,23 +152,6 @@ and c:\libjpeg-turbo\lib to your system or user LIB environment variable, and
 then link against either jpeg.lib (to use jpeg62.dll) or jpeg-static.lib (to
 use the static version of libjpeg-turbo.)
 
-If building an application using Cygwin, then set
-
-  CPATH=/cygdrive/c/libjpeg-turbo/include
-  and
-  LIBRARY_PATH=/cygdrive/c/libjpeg-turbo/lib
-
-If using MinGW, then set
-
-  CPATH=/c/libjpeg-turbo/include
-  and
-  LIBRARY_PATH=/c/libjpeg-turbo/lib
-
-and link using -ljpeg in both cases.  NOTE: The static libraries shipped with
-the Windows version of libjpeg-turbo cannot be used with MinGW and Cygwin.  If
-you wish to link statically with libjpeg-turbo using MinGW or Cygwin, then you
-will need to build libjpeg-turbo from source using GCC.
-
 =====================
 Colorspace Extensions
 =====================
index 61923b59ab1b40e4ce309b7257c47d7f70a74986..6142d664032790785df4864ccb696607a24c2141 100644 (file)
@@ -1,6 +1,6 @@
-Name "libjpeg-turbo SDK"
-OutFile ${WSRCDIR}\libjpeg-turbo.exe
-InstallDir ${WINSTDIR}
+Name "libjpeg-turbo SDK for ${PLATFORM}"
+OutFile ${WBLDDIR}\${APPNAME}.exe
+InstallDir c:\${APPNAME}
 
 SetCompressor bzip2
 
@@ -10,35 +10,47 @@ Page instfiles
 UninstPage uninstConfirm
 UninstPage instfiles
 
-Section "libjpeg-turbo SDK (required)"
+Section "libjpeg-turbo SDK for ${PLATFORM} (required)"
        SectionIn RO
        SetOutPath $SYSDIR
-       File "${WSRCDIR}\turbojpeg.dll"
-       File "${WSRCDIR}\jpeg62.dll"
+!ifdef GCC
+       File "${WLIBDIR}\libturbojpeg.dll"
+       File "${WLIBDIR}\libjpeg-62.dll"
+!else
+       File "${WLIBDIR}\turbojpeg.dll"
+       File "${WLIBDIR}\jpeg62.dll"
+!endif
        SetOutPath $INSTDIR\lib
-       File "${WSRCDIR}\turbojpeg.lib"
-       File "${WSRCDIR}\turbojpeg-static.lib"
-       File "${WSRCDIR}\jpeg.lib"
-       File "${WSRCDIR}\jpeg-static.lib"
+!ifdef GCC
+       File "${WLIBDIR}\libturbojpeg.dll.a"
+       File "${WLIBDIR}\libturbojpeg.a"
+       File "${WLIBDIR}\libjpeg.dll.a"
+       File "${WLIBDIR}\libjpeg.a"
+!else
+       File "${WLIBDIR}\turbojpeg.lib"
+       File "${WLIBDIR}\turbojpeg-static.lib"
+       File "${WLIBDIR}\jpeg.lib"
+       File "${WLIBDIR}\jpeg-static.lib"
+!endif
        SetOutPath $INSTDIR\include
-       File "win\jconfig.h"
-       File "jerror.h"
-       File "jmorecfg.h"
-       File "jpeglib.h"
-       File "turbojpeg.h"
+       File "${WHDRDIR}\jconfig.h"
+       File "${WSRCDIR}\jerror.h"
+       File "${WSRCDIR}\jmorecfg.h"
+       File "${WSRCDIR}\jpeglib.h"
+       File "${WSRCDIR}\turbojpeg.h"
        SetOutPath $INSTDIR
-       File "README"
-       File "README-turbo.txt"
-       File "libjpeg.doc"
-       File "LGPL.txt"
-       File "LICENSE.txt"
+       File "${WSRCDIR}\README"
+       File "${WSRCDIR}\README-turbo.txt"
+       File "${WSRCDIR}\libjpeg.doc"
+       File "${WSRCDIR}\LGPL.txt"
+       File "${WSRCDIR}\LICENSE.txt"
 
-       WriteRegStr HKLM "SOFTWARE\libjpeg-turbo ${VERSION}" "Install_Dir" "$INSTDIR"
+       WriteRegStr HKLM "SOFTWARE\${APPNAME} ${VERSION}" "Install_Dir" "$INSTDIR"
 
-       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "DisplayName" "libjpeg-turbo SDK ${VERSION}"
-       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "UninstallString" '"$INSTDIR\uninstall_${VERSION}.exe"'
-       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "NoModify" 1
-       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "NoRepair" 1
+       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "DisplayName" "libjpeg-turbo SDK v${VERSION} for ${PLATFORM}"
+       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "UninstallString" '"$INSTDIR\uninstall_${VERSION}.exe"'
+       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "NoModify" 1
+       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}" "NoRepair" 1
        WriteUninstaller "uninstall_${VERSION}.exe"
 SectionEnd
 
@@ -46,15 +58,24 @@ Section "Uninstall"
 
        SetShellVarContext all
 
-       DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}"
-       DeleteRegKey HKLM "SOFTWARE\libjpeg-turbo ${VERSION}"
+       DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME} ${VERSION}"
+       DeleteRegKey HKLM "SOFTWARE\${APPNAME} ${VERSION}"
 
+!ifdef GCC
+       Delete $SYSDIR\libjpeg-62.dll
+       Delete $SYSDIR\libturbojpeg.dll
+       Delete $INSTDIR\lib\libturbojpeg.dll.a"
+       Delete $INSTDIR\lib\libturbojpeg.a"
+       Delete $INSTDIR\lib\libjpeg.dll.a"
+       Delete $INSTDIR\lib\libjpeg.a"
+!else
        Delete $SYSDIR\jpeg62.dll
        Delete $SYSDIR\turbojpeg.dll
        Delete $INSTDIR\lib\jpeg.lib
        Delete $INSTDIR\lib\jpeg-static.lib
        Delete $INSTDIR\lib\turbojpeg.lib
        Delete $INSTDIR\lib\turbojpeg-static.lib
+!endif
        Delete $INSTDIR\include\jconfig.h"
        Delete $INSTDIR\include\jerror.h"
        Delete $INSTDIR\include\jmorecfg.h"
index 4fdd58faa09b5af49b94faf02fb78f884d2a96a7..382857c95bd1d034ae80978d479a26e873837a3b 100755 (executable)
@@ -229,15 +229,11 @@ $(ODIR)/jpegut.exe: $(ODIR)/jpegut.obj $(ODIR)/turbojpeg.lib
        $(LINK) $(LDFLAGS) -out:$@ $^
 
 
-WINSTDIR=c:\\libjpeg-turbo
-WSRCDIR=windows
-
 dist: all
        $(RM) $(ODIR)/libjpeg-turbo.exe
-       makensis /nocd //DVERSION=$(VERSION) //DWINSTDIR=$(WINSTDIR) \
-               //DWSRCDIR=$(WSRCDIR) release/libjpeg-turbo.nsi || \
-       makensis /nocd /DVERSION=$(VERSION) /DWINSTDIR=$(WINSTDIR) \
-               /DWSRCDIR=$(WSRCDIR) release/libjpeg-turbo.nsi  # Cygwin doesn't like the //
+       makensis -nocd -DVERSION=$(VERSION) -DAPPNAME=libjpeg-turbo \
+               -DWLIBDIR=windows -DWSRCDIR=. -DWBLDDIR=windows -DWHDRDIR=win \
+               -DPLATFORM="Visual C++" release/libjpeg-turbo.nsi
 
 
 test: testclean $(ODIR)/cjpeg.exe $(ODIR)/djpeg.exe $(ODIR)/jpegtran.exe \