From 69f6786b45d11930ae77fc542eb68cfc758648f3 Mon Sep 17 00:00:00 2001 From: vp153 Date: Mon, 22 Feb 2010 17:33:18 +0000 Subject: [PATCH] applied CMake-2.4 compatibility patch (by Brian Gerkey) git-svn-id: https://code.ros.org/svn/opencv/trunk@2710 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08 --- opencv/3rdparty/flann/CMakeLists.txt | 4 +++- opencv/3rdparty/lapack/CMakeLists.txt | 4 +++- opencv/3rdparty/zlib/CMakeLists.txt | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/opencv/3rdparty/flann/CMakeLists.txt b/opencv/3rdparty/flann/CMakeLists.txt index 07af1892..b4e735aa 100644 --- a/opencv/3rdparty/flann/CMakeLists.txt +++ b/opencv/3rdparty/flann/CMakeLists.txt @@ -43,9 +43,11 @@ if(MSVC) add_definitions(-DJAS_WIN_MSVC_BUILD) endif() -if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) +if(UNIX) + if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + endif() endif() set_target_properties(${the_target} diff --git a/opencv/3rdparty/lapack/CMakeLists.txt b/opencv/3rdparty/lapack/CMakeLists.txt index 37896752..609265c5 100644 --- a/opencv/3rdparty/lapack/CMakeLists.txt +++ b/opencv/3rdparty/lapack/CMakeLists.txt @@ -41,8 +41,10 @@ if(MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") endif() -if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) +if(UNIX) + if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + endif() endif() if(CMAKE_COMPILER_IS_GNUCXX) diff --git a/opencv/3rdparty/zlib/CMakeLists.txt b/opencv/3rdparty/zlib/CMakeLists.txt index cfe057cd..1594f5e9 100644 --- a/opencv/3rdparty/zlib/CMakeLists.txt +++ b/opencv/3rdparty/zlib/CMakeLists.txt @@ -23,8 +23,10 @@ if(MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") endif() -if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) +if(UNIX) + if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + endif() endif() set_target_properties(${the_target} -- 2.39.2