libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd build/vc2005/config.h build/vc2008/libcv...


From: Gerhard Reitmayr
Subject: [libcvd-members] libcvd build/vc2005/config.h build/vc2008/libcv...
Date: Wed, 05 Aug 2009 14:59:09 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Gerhard Reitmayr <gerhard>      09/08/05 14:59:09

Modified files:
        build/vc2005   : config.h 
        build/vc2008   : libcvd.sln libcvd.vcproj 
        cvd            : documentation.h 
Added files:
        build          : install.bat 

Log message:
        updated vc2008 build system to use install locations, added some 
documentation for that

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/build/vc2005/config.h?cvsroot=libcvd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/libcvd/build/vc2008/libcvd.sln?cvsroot=libcvd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/libcvd/build/vc2008/libcvd.vcproj?cvsroot=libcvd&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/documentation.h?cvsroot=libcvd&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/libcvd/build/install.bat?cvsroot=libcvd&rev=1.1

Patches:
Index: build/vc2005/config.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/build/vc2005/config.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- build/vc2005/config.h       12 Jul 2009 16:20:36 -0000      1.2
+++ build/vc2005/config.h       5 Aug 2009 14:59:09 -0000       1.3
@@ -87,10 +87,14 @@
 typedef __int32 int32_t;
 
 // avoid warnings about using old unsave versions of libc functions
+#ifndef _CRT_SECURE_NO_WARNINGS
 #define _CRT_SECURE_NO_WARNINGS
+#endif
 
 // avoid warnings about checked/unchecked iterators
+#ifndef _SCL_SECURE_NO_WARNINGS
 #define _SCL_SECURE_NO_WARNINGS
+#endif
 
 // to get M_PI, etc.
 #define _USE_MATH_DEFINES   

Index: build/vc2008/libcvd.sln
===================================================================
RCS file: /cvsroot/libcvd/libcvd/build/vc2008/libcvd.sln,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- build/vc2008/libcvd.sln     12 Jul 2009 16:20:36 -0000      1.2
+++ build/vc2008/libcvd.sln     5 Aug 2009 14:59:09 -0000       1.3
@@ -3,6 +3,11 @@
 # Visual Studio 2008
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcvd", "libcvd.vcproj", 
"{DB1962D5-5EBB-499D-9F84-4FCF6435063C}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", 
"install.vcproj", "{78ED5E94-8383-418F-876D-8FB7AFD2E7BF}"
+       ProjectSection(ProjectDependencies) = postProject
+               {DB1962D5-5EBB-499D-9F84-4FCF6435063C} = 
{DB1962D5-5EBB-499D-9F84-4FCF6435063C}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -13,6 +18,10 @@
                {DB1962D5-5EBB-499D-9F84-4FCF6435063C}.Debug|Win32.Build.0 = 
Debug|Win32
                {DB1962D5-5EBB-499D-9F84-4FCF6435063C}.Release|Win32.ActiveCfg 
= Release|Win32
                {DB1962D5-5EBB-499D-9F84-4FCF6435063C}.Release|Win32.Build.0 = 
Release|Win32
+               {78ED5E94-8383-418F-876D-8FB7AFD2E7BF}.Debug|Win32.ActiveCfg = 
Debug|Win32
+               {78ED5E94-8383-418F-876D-8FB7AFD2E7BF}.Debug|Win32.Build.0 = 
Debug|Win32
+               {78ED5E94-8383-418F-876D-8FB7AFD2E7BF}.Release|Win32.ActiveCfg 
= Release|Win32
+               {78ED5E94-8383-418F-876D-8FB7AFD2E7BF}.Release|Win32.Build.0 = 
Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE

Index: build/vc2008/libcvd.vcproj
===================================================================
RCS file: /cvsroot/libcvd/libcvd/build/vc2008/libcvd.vcproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- build/vc2008/libcvd.vcproj  12 Jul 2009 16:51:02 -0000      1.3
+++ build/vc2008/libcvd.vcproj  5 Aug 2009 14:59:09 -0000       1.4
@@ -22,6 +22,7 @@
                        IntermediateDirectory="$(ConfigurationName)"
                        ConfigurationType="4"
                        CharacterSet="0"
+                       WholeProgramOptimization="1"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
@@ -41,7 +42,8 @@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               
AdditionalIncludeDirectories="..\..;..\..\..;&quot;..\..\..\Pre-built.2\include&quot;;&quot;..\..\..\jpeg-7&quot;"
+                               WholeProgramOptimization="false"
+                               
AdditionalIncludeDirectories="..\..;&quot;$(INCLUDEDIR)&quot;"
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="3"
@@ -62,10 +64,9 @@
                        />
                        <Tool
                                Name="VCLibrarianTool"
-                               LinkLibraryDependencies="false"
                                AdditionalDependencies="pthreadVCE2.lib 
jpeg.lib"
                                OutputFile="..\..\lib\$(ProjectName)d.lib"
-                               
AdditionalLibraryDirectories="../../../Pre-built.2/lib;../../../jpeg-7/Release"
+                               
AdditionalLibraryDirectories="&quot;$(LIBDIR)&quot;"
                        />
                        <Tool
                                Name="VCALinkTool"
@@ -110,9 +111,10 @@
                                Name="VCCLCompilerTool"
                                InlineFunctionExpansion="2"
                                FavorSizeOrSpeed="1"
-                               
AdditionalIncludeDirectories="..\..;..\..\..;&quot;..\..\..\Pre-built.2\include&quot;;&quot;..\..\..\jpeg-7&quot;"
+                               
AdditionalIncludeDirectories="..\..;&quot;$(INCLUDEDIR)&quot;"
                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
                                RuntimeLibrary="2"
+                               EnableEnhancedInstructionSet="2"
                                UsePrecompiledHeader="0"
                                WarningLevel="3"
                                DebugInformationFormat="3"
@@ -131,7 +133,7 @@
                                Name="VCLibrarianTool"
                                AdditionalDependencies="pthreadVCE2.lib 
jpeg.lib"
                                OutputFile="..\..\lib\$(ProjectName).lib"
-                               
AdditionalLibraryDirectories="../../../Pre-built.2/lib;../../../jpeg-7/Release"
+                               
AdditionalLibraryDirectories="&quot;$(LIBDIR)&quot;"
                        />
                        <Tool
                                Name="VCALinkTool"
@@ -887,12 +889,6 @@
                                </File>
                        </Filter>
                </Filter>
-               <Filter
-                       Name="Resource Files"
-                       
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-                       
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-                       >
-               </Filter>
        </Files>
        <Globals>
        </Globals>

Index: cvd/documentation.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/documentation.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- cvd/documentation.h 4 Jun 2009 17:07:50 -0000       1.27
+++ cvd/documentation.h 5 Aug 2009 14:59:09 -0000       1.28
@@ -112,7 +112,7 @@
                        - .dylib libraries
        - Cygwin: x86
        - MinGW: x86 (native and cross compile)
-       - Win32: Visual Studio 2005
+       - Win32: Visual Studio 2008, 2005
 
   -Has worked on (current status unknown):
        - Linux: PPC
@@ -149,6 +149,31 @@
                        - pnm_src/jpeg.cc
                - Remove <code>cvd_src/videosource.o</code> from 
<code>Makefile</code> and use <code>--disable-jpeg</code>
                - Compile files with -O2 instead of -O3
+
+\subsection win32 Windows
+
+For Win32 systems, the @c build directory contains project files for different 
versions
+of Visual Studio. Currently the vc2008 solutin is supported and should work 
out of the box. There
+are two projects, one for compiling libcvd and one for installing it into a 
common directory tree.
+Both projects assume the existence of three environment variables describing 
the location of header, 
+library and binary files (for DLLs).
+       
+       - @c INCLUDEDIR contains the header files. libcvd headers will be 
copied into @c \%INCLUDEDIR%\\\libcvd
+       - @c LIBDIR contains library files. libcvd static libraries (debug and 
release verions) will be copied into @c \%LIBDIR\%
+       - @c BINDIR is not used for libcvd, but would be the default directory 
for DLLs
+
+libCVD requires at least two libraries to compile:
+       - pthreads-win32 at http://sourceware.org/pthreads-win32/
+       - jpeg-7 at http://www.ijg.org/
+
+Both libraries should be moved into the directory tree described by @c 
INCLUDEDIR, @c LIBDIR and @c BINDIR where the libCVD 
+project files will expect them.
+
+libCVD compiles to static libraries for simpler linking and to avoid the 
_dllexport/_dllimport statements throughout the code.
+
+Configuration of features is manual through a default config file in @c 
build/vc2005/config.h. Edit this file to change your configuration, 
+for example to support other image formats such as PNG.
+
 */
 
 ///////////////////////////////////////////////////////

Index: build/install.bat
===================================================================
RCS file: build/install.bat
diff -N build/install.bat
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ build/install.bat   5 Aug 2009 14:59:09 -0000       1.1
@@ -0,0 +1,71 @@
+rem @echo off
+
+set headersdir=%1
+set headersname=%2
+set libs=%3
+set bins=%4
+
+rem ************************************************************************
+rem * check environment variables
+
+if not "%INCLUDEDIR%"=="" goto includedirset
+echo The INCLUDEDIR environment variable must be set to point to a directory
+echo to be able to perform the installation procedure.
+exit
+
+:includedirset
+if exist %INCLUDEDIR%\*.* goto includedirexists
+echo The INCLUDEDIR environment variable must point to an existing directory
+echo to be able to perform the installation procedure.
+exit
+
+:includedirexists
+
+if not "%LIBDIR%"=="" goto libdirset
+echo The LIBDIR environment variable must be set to point to a directory
+echo to be able to perform the installation procedure.
+exit
+
+:libdirset
+if exist %LIBDIR%\*.* goto libdirexists
+echo The LIBDIR environment variable must point to an existing directory
+echo to be able to perform the installation procedure.
+exit
+
+:libdirexists
+if not "%BINDIR%"=="" goto bindirset
+echo The BINDIR environment variable must be set to point to a directory
+echo to be able to perform the installation procedure.
+exit
+
+:bindirset
+if exist %BINDIR%\*.* goto bindirexists
+echo The BINDIR environment variable must point to an existing directory
+echo to be able to perform the installation procedure.
+exit
+
+:bindirexists
+
+echo All is well installing...
+
+rem ************************************************************************
+rem * check input variables and install if necessary
+
+if "%headersdir%"=="" goto skipheaders
+if "%headersname%"=="" goto skipheaders
+
+xcopy /S /I /Y %headersdir% %INCLUDEDIR%\%headersname%
+
+:skipheaders
+
+if "%libs%"=="" goto skiplibs
+xcopy /S /I /Y %libs% %LIBDIR%
+
+:skiplibs
+
+if "%bins%"=="" goto skipbins
+xcopy /S /I /Y %bins% %BINDIR%
+
+:skipbins
+
+echo Installation finished.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]