[openrtm-commit:01442] r150 - in branches/newCMakeForVC2010/ImageProcessing/opencv: . components
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 4月 22日 (火) 17:21:24 JST
Author: harumi
Date: 2014-04-22 17:21:24 +0900 (Tue, 22 Apr 2014)
New Revision: 150
Added:
branches/newCMakeForVC2010/ImageProcessing/opencv/ip-build.bat
Modified:
branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt
Log:
add ip-build.bat and change ./comp/cmakelists.txt for DirectShowCam
Modified: branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt 2014-04-22 05:16:52 UTC (rev 149)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/components/CMakeLists.txt 2014-04-22 08:21:24 UTC (rev 150)
@@ -11,9 +11,17 @@
add_subdirectory(CameraViewer)
add_subdirectory(Chromakey)
add_subdirectory(Dilationerosion)
-if(DIRECTSHOW_FOUND)
+
+if ($ENV{VC_VERSION} MATCHES "10"OR $ENV{VC_VERSION} MATCHES "9")
add_subdirectory(DirectShowCam)
+else()
+ message(STATUS "VC2012~ you can't use Baseclasses.lib. so set new camera components here.")
endif()
+
+#if(DIRECTSHOW_FOUND)
+# add_subdirectory(DirectShowCam)
+#endif()
+
add_subdirectory(Edge)
add_subdirectory(Findcontour)
add_subdirectory(Flip)
Added: branches/newCMakeForVC2010/ImageProcessing/opencv/ip-build.bat
===================================================================
--- branches/newCMakeForVC2010/ImageProcessing/opencv/ip-build.bat (rev 0)
+++ branches/newCMakeForVC2010/ImageProcessing/opencv/ip-build.bat 2014-04-22 08:21:24 UTC (rev 150)
@@ -0,0 +1,264 @@
+ at echo off
+ at rem ============================================================
+ at rem OpenCVRTC (Image Processing) for Windows build batch
+ at rem
+ at rem @author Noriaki Ando <n-ando at aist.go.jp>
+ at rem Copyright (C) 2014 n-ando All Rights Reserved
+ at rem
+ at rem In order to compile OpenCVRTC (Image Processing) on Windows,
+ at rem this batch file can be used with the following prerequisite
+ at rem tools and environments.
+ at rem
+ at rem 0. 64bit Windows 7 or later
+ at rem If you want to compile both 32 bit and 64 bit binaries on one OS,
+ at rem 64 bit OS is required. Because the omniidl which is built as
+ at rem target architecture executable in midstream is required to
+ at rem compile omniORB itself. OS have to execute both (32 bit /64 bit)
+ at rem executable.
+ at rem
+ at rem 1. Cygwin
+ at rem cygwin-lite distributed from omniORB is not recommended.
+ at rem The following command should be installed on Cygwin
+ at rem wget, make, zip, svn
+ at rem
+ at rem 2. Visual C++
+ at rem Currently VC2008, 2010, 2012, 2013 are supported.
+ at rem Different versions in the same machine are not recommended.
+ at rem
+ at rem Environment vairables required
+ at rem
+ at rem OMNI_ROOT: omniORB binary installation dir
+ at rem ARCH: x86 or x86_64
+ at rem VC_VERSION: 9(=VC2008), 10(=VC2010), 11(=VC2012), 12(=VC2013),....
+ at rem PYTHON_DIR: /cygdrive/c/Python27
+ at rem OpenCV_DIR:
+ at rem
+ at rem ============================================================
+
+set OPENCV_RTC_ROOT=%~dp0
+set BUILD_DIR=%OPENCV_RTC_ROOT%\work
+set PYTHON_DIR=c:\python26;
+set OpenCV_DIR=C:\distribution\OpenCV2.4.8-win32
+set Baseclasses_DIR=C:\distribution\baseclasses
+
+set RTM_ROOT=C:\distribution\OpenRTM-aist-rv2565
+set COIL_ROOT=%RTM_ROOT%\coil
+set OpenRTM_Dir=%RTM_ROOT%\cmake
+
+set OMNI_ROOT=C:\distribution\omniORB-4.1.7-win32-vc10
+set ARCH=x86
+set VC_VERSION=10
+
+ at rem ------------------------------------------------------------
+ at rem Printing env variables
+echo Environment variables:
+echo OMNI_ROOT : %OMNI_ROOT%
+echo ARCH : %ARCH%
+echo VC_VERSION : %VC_VERSION%
+echo PYTHON_DIR : %PYTHON_DIR%
+
+set PATH_ORG=%PATH%
+set PATH=%OMNI_ROOT%\bin\x86_win32;%PATH%;%PYTHON_DIR%;
+
+if %ARCH% == x86 set DLL_ARCH=
+if %ARCH% == x86_64 set DLL_ARCH=_x64
+
+ at rem ------------------------------------------------------------
+ at rem Copying Config.cmake
+ at rem ------------------------------------------------------------
+ at rem %PYTHON_DIR%\python build\cmakeconfgen.py rtm_config.vsprops
+ at rem move OpenRTMConfig.cmake cmake
+
+ at rem ------------------------------------------------------------
+ at rem Copying Config.cmake
+ at rem ------------------------------------------------------------
+
+ at set WindowsSdkDir=
+ at for /F "tokens=1,2*" %%i in ('reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows" /v "CurrentInstallFolder"') DO (
+ if "%%i"=="CurrentInstallFolder" (
+ set "WindowsSdkDir=%%k"
+ )
+)
+
+ at set PATH="c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319";%PATH%
+
+
+ at rem ============================================================
+ at rem make work dir
+ at rem ============================================================
+echo work dir : work
+if not exist "work" (
+ mkdir work
+) else (
+ @rem del /s /q work
+ @rem mkdir work
+)
+
+ at rem ============================================================
+ at rem switching to x86 or x86_64
+ at rem ============================================================
+echo ARCH %ARCH%
+if %ARCH% == x86 goto cmake_x86
+if %ARCH% == x86_64 goto cmake_x86_64
+goto END
+
+
+ at rem ============================================================
+ at rem start to cmake 32bit
+ at rem ============================================================
+:cmake_x86
+cd %BUILD_DIR%
+set VC_NAME="Visual Studio %VC_VERSION%"
+if %VC_VERSION% == 9 (
+ cmake .. -G "Visual Studio 9 2008"
+ goto x86
+) else (
+ cmake .. -G %VC_NAME%
+ goto x86
+ )
+goto END
+
+ at rem ============================================================
+ at rem Compiling 32bit binaries
+ at rem ============================================================
+:x86
+echo Compiling 32bit binaries
+echo Setting up Visual C++ environment.
+if %VC_VERSION% == 9 (
+ @rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
+ call C:\"Program Files (x86)"\"Microsoft Visual Studio 9.0"\VC\vcvarsall.bat x86
+ goto VCBUILDx86
+ )
+if %VC_VERSION% == 10 (
+ call C:\"Program Files (x86)"\"Microsoft Visual Studio 10.0"\VC\vcvarsall.bat x86
+ @rem call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat%" x86
+ set VCTOOLSET=4.0
+ set PLATFORMTOOL=
+ goto MSBUILDx86
+ )
+if %VC_VERSION% == 11 (
+ @rem call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
+ call C:\"Program Files (x86)"\"Microsoft Visual Studio 11.0"\VC\vcvarsall.bat x86
+ set VCTOOLSET=4.0
+ set PLATFORMTOOL=/p:PlatformToolset=v110
+ goto MSBUILDx86
+ )
+if %VC_VERSION% == 12 (
+ @rem call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
+ call C:\"Program Files (x86)"\"Microsoft Visual Studio 12.0"\VC\vcvarsall.bat x86
+ set VCTOOLSET=12.0
+ set PLATFORMTOOL=/p:PlatformToolset=v120
+ goto MSBUILDx86
+ )
+
+ at rem ------------------------------------------------------------
+ at rem Build (VC2008 x86)
+ at rem ------------------------------------------------------------
+:VCBUILDx86
+harumi
+echo Visual Studio Dir: %VSINSTALLDIR%
+echo LIB: %LIB%
+set OPT=/M:4 /toolsversion:%VCTOOLSET% %PLATFORMTOOL% /p:platform=Win64
+set SLN=ImageProcessing_opencv.sln
+
+vcbuild /m:2 /t:rebuild /p:configuration=release %OPT% components\DirectShowCam\BaseClasses\BaseClasses.sln
+vcbuild /M2 /build %OPT% %SLN%
+goto END
+
+ at rem ------------------------------------------------------------
+ at rem Build (VC2010- x86)
+ at rem ------------------------------------------------------------
+:MSBUILDx86
+echo Visual Studio Dir: %VSINSTALLDIR%
+echo LIB: %LIB%
+set OPT=/M:4 /toolsversion:%VCTOOLSET% %PLATFORMTOOL% /p:platform=Win32
+set SLN=ImageProcessing_opencv.sln
+set LOG=/fileLogger /flp:logfile=debug.log /v:diag
+
+cd %BUILD_DIR%
+
+if %VC_VERSION% == 10 (
+ msbuild /m:2 /t:rebuild /p:configuration=release %OPT% components\DirectShowCam\BaseClasses\BaseClasses.sln
+)
+
+msbuild /t:build /p:configuration=release %OPT% %SLN%
+
+goto END
+
+ at rem ============================================================
+ at rem start to cmake 64bit
+ at rem ============================================================
+:cmake_x86_64
+ at rem cd %OPENCV_RTC_ROOT%
+cd %BUILD_DIR%
+ at rem cd %RTM_ROOT%
+set VC_NAME="Visual Studio %VC_VERSION% Win64"
+if %VC_VERSION% == 9 (
+ echo 64bit compilation on Visual C++ 2008 is not supported. Aborting.
+ goto END
+ )else(
+ cmake .. -G %VC_NAME%
+ goto x86_64
+ )
+goto END
+
+ at rem ============================================================
+ at rem Compiling 64bit binaries
+ at rem ============================================================
+:x86_64
+echo Compiling 64bit binaries
+ at rem Setting up Visual C++ environment
+if /i %VC_VERSION% == 9 (
+ echo 64bit compilation on Visual C++ 2008 is not supported. Aborting.
+ goto END
+ )
+if /i %VC_VERSION% == 10 (
+ call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
+ set VCTOOLSET=4.0
+ set PLATFORMTOOL=
+ goto MSBUILDx64
+ )
+if /i %VC_VERSION% == 11 (
+ call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64
+ set VCTOOLSET=4.0
+ set PLATFORMTOOL=/p:PlatformToolset=v110
+ goto MSBUILDx64
+ )
+if /i %VC_VERSION% == 12 (
+ call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
+ set VCTOOLSET=12.0
+ set PLATFORMTOOL=/p:PlatformToolset=v120
+ goto MSBUILDx64
+ )
+echo Visual Studio Dir: %VSINSTALLDIR%
+echo LIB: %LIB%
+
+ at rem ------------------------------------------------------------
+ at rem Build (VC2008 x64)
+ at rem ------------------------------------------------------------
+:VCBUILDx64
+echo Visual Studio Dir: %VSINSTALLDIR%
+echo LIB: %LIB%
+set SLN=ImageProcessing_opencv.sln
+
+vcbuild /M2 /build %SLN%
+goto END
+
+ at rem ------------------------------------------------------------
+ at rem Build (VC2010- x64)
+ at rem ------------------------------------------------------------
+:MSBUILDx64
+echo Visual Studio Dir: %VSINSTALLDIR%
+echo LIB: %LIB%
+set OPT=/M:4 /toolsversion:%VCTOOLSET% %PLATFORMTOOL% /p:platform=x64
+set LOG=/fileLogger /flp:logfile=debug.log /v:diag
+set SLN=ImageProcessing_opencv.sln
+
+msbuild /t:clean /p:configuration=release %OPT% %SLN%
+msbuild /t:build /p:configuration=release %OPT% %SLN%
+
+goto END
+
+:END
+cd %OPENCV_RTC_ROOT%
+set PATH=%PATH_ORG%
More information about the openrtm-commit
mailing list