mirror of
https://github.com/opencv/opencv.git
synced 2025-06-17 15:20:51 +08:00
Modifies standalone G-API cmake for testing it properly
This commit is contained in:
parent
abfcb60118
commit
6b31f58092
@ -1,6 +1,7 @@
|
|||||||
# FIXME: Rework standalone build in more generic maner
|
# FIXME: Rework standalone build in more generic maner
|
||||||
# (Restructure directories, add common pass, etc)
|
# (Restructure directories, add common pass, etc)
|
||||||
if (NOT DEFINED OPENCV_INITIAL_PASS)
|
if (NOT DEFINED OPENCV_INITIAL_PASS)
|
||||||
|
cmake_minimum_required(VERSION 3.3)
|
||||||
include("cmake/standalone.cmake")
|
include("cmake/standalone.cmake")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
||||||
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT TARGET ade )
|
if (NOT TARGET ade )
|
||||||
find_package(ade 0.1.0 REQUIRED)
|
find_package(ade 0.1.0 REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
@ -23,7 +27,7 @@ target_include_directories(${FLUID_TARGET}
|
|||||||
PUBLIC $<BUILD_INTERFACE:${FLUID_ROOT}/include>
|
PUBLIC $<BUILD_INTERFACE:${FLUID_ROOT}/include>
|
||||||
PRIVATE ${FLUID_ROOT}/src)
|
PRIVATE ${FLUID_ROOT}/src)
|
||||||
|
|
||||||
target_compile_definitions(${FLUID_TARGET} PUBLIC -DGAPI_STANDALONE
|
target_compile_definitions(${FLUID_TARGET} PUBLIC GAPI_STANDALONE
|
||||||
# This preprocessor definition resolves symbol clash when
|
# This preprocessor definition resolves symbol clash when
|
||||||
# standalone fluid meets gapi ocv module in one application
|
# standalone fluid meets gapi ocv module in one application
|
||||||
PUBLIC cv=fluidcv)
|
PUBLIC cv=fluidcv)
|
||||||
@ -31,4 +35,9 @@ target_compile_definitions(${FLUID_TARGET} PUBLIC -DGAPI_STANDALONE
|
|||||||
set_target_properties(${FLUID_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE True)
|
set_target_properties(${FLUID_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE True)
|
||||||
set_property(TARGET ${FLUID_TARGET} PROPERTY CXX_STANDARD 11)
|
set_property(TARGET ${FLUID_TARGET} PROPERTY CXX_STANDARD 11)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
target_compile_options(${FLUID_TARGET} PUBLIC "/wd4251")
|
||||||
|
target_compile_definitions(${FLUID_TARGET} PRIVATE _CRT_SECURE_NO_DEPRECATE)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${FLUID_TARGET} PRIVATE ade)
|
target_link_libraries(${FLUID_TARGET} PRIVATE ade)
|
||||||
|
Loading…
Reference in New Issue
Block a user