mirror of https://github.com/opencv/opencv.git
Merge pull request #6321 from mshabunin:hal_cmake
commit
1e1dc1429f
6 changed files with 32 additions and 31 deletions
@ -1,11 +1,9 @@ |
||||
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) |
||||
|
||||
if(UNIX) |
||||
if(CMAKE_COMPILER_IS_GNUC OR CV_ICC) |
||||
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") |
||||
endif() |
||||
endif() |
||||
|
||||
add_library(c_hal impl.c) |
||||
set_target_properties(c_hal PROPERTIES POSITION_INDEPENDENT_CODE TRUE) |
||||
set(OPENCV_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../..") |
||||
target_include_directories(c_hal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${OPENCV_SRC_DIR}/modules/core/include) |
||||
|
||||
configure_file("impl.h" "${CMAKE_BINARY_DIR}/impl.h" COPYONLY) |
||||
configure_file("config.cmake" "${CMAKE_BINARY_DIR}/OpenCV_HALConfig.cmake" COPYONLY) |
||||
|
@ -0,0 +1,5 @@ |
||||
set(OpenCV_HAL_FOUND TRUE) |
||||
set(OpenCV_HAL_VERSION "0.0.1") |
||||
set(OpenCV_HAL_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/libc_hal.a") |
||||
set(OpenCV_HAL_HEADERS "impl.h") |
||||
set(OpenCV_HAL_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}") |
@ -1,11 +1,9 @@ |
||||
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) |
||||
|
||||
if(UNIX) |
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") |
||||
endif() |
||||
endif() |
||||
|
||||
add_library(slow_hal impl.cpp) |
||||
set_target_properties(slow_hal PROPERTIES POSITION_INDEPENDENT_CODE TRUE) |
||||
set(OPENCV_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../..") |
||||
target_include_directories(slow_hal PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${OPENCV_SRC_DIR}/modules/core/include) |
||||
|
||||
configure_file("impl.hpp" "${CMAKE_BINARY_DIR}/impl.hpp" COPYONLY) |
||||
configure_file("config.cmake" "${CMAKE_BINARY_DIR}/OpenCV_HALConfig.cmake" COPYONLY) |
||||
|
@ -0,0 +1,5 @@ |
||||
set(OpenCV_HAL_FOUND TRUE) |
||||
set(OpenCV_HAL_VERSION "0.0.1") |
||||
set(OpenCV_HAL_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/libslow_hal.a") |
||||
set(OpenCV_HAL_HEADERS "impl.hpp") |
||||
set(OpenCV_HAL_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}") |
Loading…
Reference in new issue