1 Star 0 Fork 0

不落飘雨/emgucv

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 86.32 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058
# --------------------------------------------------------
# Copyright (C) 2004-2020 by EMGU Corporation. All rights reserved.
#
# Root CMake file for Emgu CV
#
# From the off-tree build directory, invoke:
# $ cmake <PATH_TO_EMGUCV_ROOT>
#
# --------------------------------------------------------
PROJECT(emgucv)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.1)
IF( WIN32 OR ANDROID OR APPLE OR NETFX_CORE)
SET(EMGU_CV_WITH_FREETYPE ON CACHE BOOL "BUILD FREETYPE")
ELSE()
SET(EMGU_CV_WITH_FREETYPE OFF CACHE BOOL "BUILD FREETYPE")
ENDIF()
IF (EMGU_CV_WITH_FREETYPE)
IF (IOS)
MESSAGE(STATUS "Setting up freetype for IOS ")
#FIND_PACKAGE(FREETYPE)
IF(NOT FREETYPE_FOUND)
#MESSAGE(STATUS "((((((((((((((((((( FREETYPE2 added )))))))))))))))))))")
ADD_SUBDIRECTORY(freetype2)
SET(FREETYPE_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/freetype2/include")
SET(FREETYPE_LIBRARIES "freetype")
SET(FREETYPE_LIBRARY "freetype")
#SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/freetype2/CMakeFiles/Export/lib/cmake/freetype")
#SET(freetype_DIR "${CMAKE_BINARY_DIR}/freetype2/CMakeFiles/Export/lib/cmake/freetype")
FIND_PACKAGE(freetype)
SET(FREETYPE_FOUND ON)
ENDIF()
#FIND_PACKAGE(HARFBUZZ)
IF(NOT HARFBUZZ_FOUND)
SET(HB_HAVE_FREETYPE ON)
SET(HARFBUZZ_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/harfbuzz/src")
SET(HARFBUZZ_LIBRARIES "harfbuzz")
ADD_SUBDIRECTORY(harfbuzz)
target_compile_definitions(harfbuzz PUBLIC HB_NO_VISIBILITY)
#SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/harfbuzz/CMakeFiles/Export/lib/cmake/harfbuzz")
#SET(harfbuzz_DIR "${CMAKE_BINARY_DIR}/harfbuzz/CMakeFiles/Export/lib/cmake/harfbuzz")
MESSAGE(STATUS "harfbuzz_DIR: ${harfbuzz_DIR}")
FIND_PACKAGE(harfbuzz)
SET(HARFBUZZ_FOUND ON)
ENDIF()
ELSEIF (NETFX_CORE OR ANDROID)
MESSAGE(STATUS "Setting up freetype for NETFX_CORE / Android / IOS ")
#FIND_PACKAGE(FREETYPE)
IF(NOT FREETYPE_FOUND)
#MESSAGE(STATUS "((((((((((((((((((( FREETYPE2 added )))))))))))))))))))")
ADD_SUBDIRECTORY(freetype2)
SET(FREETYPE_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/freetype2/include")
SET(FREETYPE_LIBRARIES "freetype")
SET(FREETYPE_LIBRARY "freetype")
#SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/freetype2/CMakeFiles/Export/lib/cmake/freetype")
#SET(freetype_DIR "${CMAKE_BINARY_DIR}/freetype2/CMakeFiles/Export/lib/cmake/freetype")
FIND_PACKAGE(freetype)
SET(FREETYPE_FOUND ON)
ENDIF()
#FIND_PACKAGE(HARFBUZZ)
IF(NOT HARFBUZZ_FOUND)
SET(HB_HAVE_FREETYPE ON)
SET(HARFBUZZ_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/harfbuzz/src")
SET(HARFBUZZ_LIBRARIES "harfbuzz")
ADD_SUBDIRECTORY(harfbuzz)
#SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_BINARY_DIR}/harfbuzz/CMakeFiles/Export/lib/cmake/harfbuzz")
#SET(harfbuzz_DIR "${CMAKE_BINARY_DIR}/harfbuzz/CMakeFiles/Export/lib/cmake/harfbuzz")
MESSAGE(STATUS "harfbuzz_DIR: ${harfbuzz_DIR}")
FIND_PACKAGE(harfbuzz)
SET(HARFBUZZ_FOUND ON)
ENDIF()
ELSEIF(WIN32 OR APPLE)
MESSAGE(STATUS "Setting up freetype for Windows / Mac")
SET(FREETYPE_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/freetype2/include")
SET(FREETYPE_LIBRARIES "freetype" CACHE INTERNAL "")
SET(FREETYPE_LINK_LIBRARIES_XXXXX ON)
SET(FREETYPE_LINK_LIBRARIES "freetype")
SET(FREETYPE_LIBRARY "freetype")
ADD_SUBDIRECTORY(freetype2)
FIND_PACKAGE(freetype)
SET(FREETYPE_FOUND ON)
SET(HB_HAVE_FREETYPE ON)
SET(HARFBUZZ_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/harfbuzz/src")
SET(HARFBUZZ_LIBRARIES "harfbuzz" CACHE INTERNAL "")
SET(HARFBUZZ_LINK_LIBRARIES_XXXXX ON)
SET(HARFBUZZ_LINK_LIBRARIES "harfbuzz")
SET(HARFBUZZ_LIBRARY "harfbuzz")
ADD_SUBDIRECTORY(harfbuzz)
SET(HARFBUZZ_FOUND ON)
ELSE()
ENDIF()
ELSE()
SET(FREETYPE_LIBRARY "")
ENDIF()
IF( NOT (NETFX_CORE OR ANDROID OR IOS ) )
# IF (NOT WIN32)
# SET(CMAKE_C_FLAGS_RELEASE "-fPIC ${CMAKE_C_FLAGS_RELEASE}")
# SET(CMAKE_CXX_FLAGS_RELEASE "-fPIC ${CMAKE_CXX_FLAGS_RELEASE}")
# SET(CMAKE_C_FLAGS_DEBUG "-fPIC ${CMAKE_C_FLAGS_DEBUG}")
# SET(CMAKE_CXX_FLAGS_DEBUG "-fPIC ${CMAKE_CXX_FLAGS_DEBUG}")
# SET(CMAKE_EXE_LINKER_FLAGS "-fPIC ${CMAKE_EXE_LINKER_FLAGS}")
# SET(CMAKE_SHARED_LINKER_FLAGS "-fPIC ${CMAKE_SHARED_LINKER_FLAGS}")
# ENDIF()
IF (WIN32)
SET(BUILD_SHARED_LIBS_CACHE ${BUILD_SHARED_LIBS})
SET(BUILD_SHARED_LIBS OFF)
SET(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON)
ADD_SUBDIRECTORY(vtk) # always build vtk as static library
SET(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_CACHE})
ENDIF()
# IF (NOT WIN32)
# SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE_CACHE} )
# SET(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE_CACHE})
# ENDIF()
ENDIF()
SET(OPENCV_SUBFOLDER ${CMAKE_CURRENT_SOURCE_DIR}/opencv)
SET(OPENCV_CONTRIB_SUBFOLDER ${CMAKE_CURRENT_SOURCE_DIR}/opencv_contrib)
SET(OPENCV_EXTRA_SUBFOLDER ${CMAKE_CURRENT_SOURCE_DIR}/opencv_extra)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
#IF (NOT ANDROID)
SET(CSC_PREFERRED_VERSION "4.0")
IF((NOT NETFX_CORE) AND MSVC)
#SET CSC 3.5 as the prefered compiler for EMGU CV
SET(CSC_TARGET_FRAMEWORK "3.5" CACHE STRING "C# target framework")
ELSE()
#SET CSC 4.5 (in the .Net framework 4.0 folder) as the prefered compiler for EMGU CV
SET(CSC_TARGET_FRAMEWORK "" CACHE STRING "C# target framework")
ENDIF()
FIND_PACKAGE(CSharp REQUIRED)
INCLUDE (CSharpMacros)
#ENDIF()
INCLUDE (CheckTargetArch)
INCLUDE (OpenCVVersion)
SET(LIBRARY_3RDPARTY_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/3rdParty)
# ----------------------------------------------------------------------------
# Autodetect if we are in a GIT repository
# ----------------------------------------------------------------------------
FIND_PROGRAM(GIT_PATH git)
FIND_PROGRAM(WC_PATH wc PATHS "c:/cygwin64/bin" "c:/cygwin/bin")
MARK_AS_ADVANCED(force GIT_PATH WC_PATH)
IF(GIT_PATH AND WC_PATH)
MESSAGE(STATUS "Extracting Emgu CV git version, please wait...")
EXECUTE_PROCESS(
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${GIT_PATH} log --oneline
COMMAND ${WC_PATH} -l
OUTPUT_VARIABLE GITVERSION_RESULT)
#MESSAGE(STATUS "COMMAND: ${GIT_PATH} log --oneline | ${WC_PATH} -l")
STRING(REGEX REPLACE "^([0123456789]+).*" "\\1" EMGUCV_GITVERSION "${GITVERSION_RESULT}")
STRING(STRIP "${EMGUCV_GITVERSION}" EMGUCV_GITVERSION)
IF(EMGUCV_GITVERSION MATCHES "^$" OR EMGUCV_GITVERSION MATCHES "^-")
# This is NOT a git repository:
SET(EMGUCV_GITVERSION "0")
ENDIF()
MESSAGE(STATUS "Emgu CV GIT VERSION: ${EMGUCV_GITVERSION}")
ELSE()
# We don't have git or wc:
SET(EMGUCV_GITVERSION "0")
ENDIF()
# ----------------------------------------------------------------------------
# Check if 32bit or 64-bit
# ----------------------------------------------------------------------------
CHECK_TARGET_ARCH()
IF (WIN32)
MESSAGE(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
MESSAGE(STATUS "CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
#STRING(FIND "${CMAKE_GENERATOR}" "ARM" IS_ARM)
IF(TARGET_ARCH_64)
IF(TARGET_ARM)
SET(EMGUCV_ARCH arm64)
ELSE()
SET(EMGUCV_ARCH win64)
ENDIF()
ELSE()
IF(TARGET_ARM)
SET(EMGUCV_ARCH arm)
ELSE()
SET(EMGUCV_ARCH win32)
ENDIF()
ENDIF()
ELSE(WIN32)
SET(EMGUCV_ARCH ${CMAKE_SYSTEM_NAME})
ENDIF(WIN32)
MESSAGE(STATUS "Building for ${EMGUCV_ARCH}")
IF(WIN32 AND CV_ICC)
# SET(CV_ICC_ADDITIONAL_FLAGS_RELEASE "/O3 /QaxCORE-AVX2,AVX,SSE4.1,SSE3 /Qparallel /Qopt-report:1 /Qopt-report-phase:vec /Qopt-report-phase:par /Qopt-report-file:stderr /Qipo /Qunroll-aggressive")
SET(CV_ICC_ADDITIONAL_FLAGS_RELEASE "/O3 /QaxCORE-AVX2,AVX,SSE4.1,SSE3 /Qparallel /Qopt-report:1 /Qopt-report-phase:vec /Qopt-report-phase:par /Qipo /Qrestrict /Ot")
STRING(REGEX REPLACE "/O2" ${CV_ICC_ADDITIONAL_FLAGS_RELEASE} CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
STRING(REGEX REPLACE "/O2" ${CV_ICC_ADDITIONAL_FLAGS_RELEASE} CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:\"libcmt\"")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:\"libcmt\"")
set(EMGUCV_PLATFORM_TOOLSET "Intel C++ Compiler 19.1" CACHE STRING "Platform toolset for Visual Studio")
ENDIF()
IF(WIN32 AND NOT MINGW)
SET(NETFX_CORE OFF CACHE BOOL "Build Windows Store App")
# IF(NETFX_CORE)
# add_definitions(-DWINAPI_FAMILY=WINAPI_FAMILY_APP -DWINVER=0x0602 -D_WIN32_WINNT=0x0602)
# add_definitions(-D_UNICODE)
# ENDIF()
ENDIF()
IF(IOS)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/libs)
ELSE()
SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/libs)
ENDIF()
IF(NOT WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/libs)
ENDIF()
IF(ANDROID)
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/android/${ANDROID_ABI}")
ELSEIF(WIN32)
IF ("${EMGUCV_ARCH}" STREQUAL "win64")
IF("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND (CMAKE_SYSTEM_VERSION MATCHES 10.0))
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/UWP/x64")
ELSE()
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/x64")
ENDIF()
ELSEIF("${EMGUCV_ARCH}" STREQUAL "arm64")
IF("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND (CMAKE_SYSTEM_VERSION MATCHES 10.0))
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/UWP/arm64")
ELSE()
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/arm64")
ENDIF()
ELSEIF("${EMGUCV_ARCH}" STREQUAL "arm")
IF("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND (CMAKE_SYSTEM_VERSION MATCHES 10.0))
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/UWP/arm")
ELSE()
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/arm")
ENDIF()
ELSE()
IF("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore" AND (CMAKE_SYSTEM_VERSION MATCHES 10.0))
#IF("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
# IF(CMAKE_SYSTEM_VERSION MATCHES 10.0)
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/UWP/x86")
ELSE()
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/x86")
ENDIF()
ENDIF()
#MESSAGE(STATUS ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
#MESSAGE(STATUS ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> EMGUCV_ARCH: ${EMGUCV_ARCH}")
#MESSAGE(STATUS ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER: ${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER}")
ELSEIF(APPLE AND NOT IOS)
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "/osx")
ELSE()
SET(UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER "")
ENDIF()
SET(UNMANAGED_LIBRARY_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/libs${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER}")
IF(ANDROID)
SET(LIBRARY_OUTPUT_PATH ${UNMANAGED_LIBRARY_OUTPUT_PATH})
ENDIF()
FILE(MAKE_DIRECTORY ${UNMANAGED_LIBRARY_OUTPUT_PATH})
SET(UNMANAGED_DLL_EXTRA)
MACRO(CHECK_BINARY_EXIST folder pattern property_name second_check)
#IF("${UNMANAGED_LIBRARY_OUTPUT_PATH}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/${folder}")
# SET(${property_name} ON)
#ELSE()
FILE(GLOB DLL_LIST "${CMAKE_CURRENT_SOURCE_DIR}/${folder}/${pattern}")
LIST(LENGTH DLL_LIST DLL_LIST_LENGTH)
IF(DLL_LIST_LENGTH GREATER 0)
LIST(APPEND UNMANAGED_DLL_EXTRA ${DLL_LIST})
MESSAGE(STATUS "Including the following files in package: ${DLL_LIST}")
INSTALL(
FILES
${DLL_LIST}
DESTINATION ${folder}
COMPONENT emgucv_binary
)
SET(${property_name} ON)
ELSE()
SET(${property_name} ${second_check})
ENDIF()
#ENDIF()
#MESSAGE(STATUS "Property - ${property_name}: ${${property_name}}")
IF(${${property_name}})
MESSAGE(STATUS "${property_name}: ${${property_name}}")
ENDIF()
ENDMACRO()
#MESSAGE(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
SET(IS_IOS_BUILD OFF)
IF(IOS)
SET(IS_IOS_BUILD ON)
MESSAGE(STATUS "IS_IOS_BUILD: ${IS_IOS_BUILD}")
SET(IS_IOS_I386_BUILD OFF)
IF(IS_IOS_BUILD AND ("${IOS_ARCH}" STREQUAL "i386"))
SET(IS_IOS_I386_BUILD ON)
MESSAGE(STATUS "IS_IOS_I386_BUILD: ${IS_IOS_I386_BUILD}")
ENDIF()
#CHECK_BINARY_EXIST("libs/iOS" "libcvextern_i386.a" HAVE_IOS_I386 ${IS_IOS_I386_BUILD})
SET(IS_IOS_X86_64_BUILD OFF)
IF(IS_IOS_BUILD AND ("${IOS_ARCH}" STREQUAL "x86_64"))
SET(IS_IOS_X86_64_BUILD ON)
MESSAGE(STATUS "IS_IOS_X86_64_BUILD: ${IS_IOS_X86_64_BUILD}")
ENDIF()
#CHECK_BINARY_EXIST("libs/iOS" "libcvextern_x86_64.a" HAVE_IOS_X86_64 ${IS_IOS_X86_64_BUILD})
SET(IS_IOS_ARMV7S_BUILD OFF)
IF(IS_IOS_BUILD AND ("${IOS_ARCH}" STREQUAL "armv7s"))
SET(IS_IOS_ARMV7S_BUILD ON)
MESSAGE(STATUS "IS_IOS_ARMV7S_BUILD: ${IS_IOS_ARMV7S_BUILD}")
ENDIF()
#CHECK_BINARY_EXIST("libs/iOS" "libcvextern_armv7s.a" HAVE_IOS_ARMV7S ${IS_IOS_ARMV7S_BUILD})
SET(IS_IOS_ARMV7_BUILD OFF)
IF(IS_IOS_BUILD AND ("${IOS_ARCH}" STREQUAL "armv7"))
SET(IS_IOS_ARMV7_BUILD ON)
MESSAGE(STATUS "IS_IOS_ARMV7_BUILD: ${IS_IOS_ARMV7_BUILD}")
ENDIF()
#CHECK_BINARY_EXIST("libs/iOS" "libcvextern_armv7.a" HAVE_IOS_ARMV7 ${IS_IOS_ARMV7_BUILD})
SET(IS_IOS_ARM64_BUILD OFF)
IF(IS_IOS_BUILD AND ("${IOS_ARCH}" STREQUAL "arm64"))
SET(IS_IOS_ARM64_BUILD ON)
MESSAGE(STATUS "IS_IOS_ARM64_BUILD: ${IS_IOS_ARM64_BUILD}")
ENDIF()
#CHECK_BINARY_EXIST("libs/iOS" "libcvextern_arm64.a" HAVE_IOS_ARM64 ${IS_IOS_ARM64_BUILD})
ENDIF()
CHECK_BINARY_EXIST("libs/iOS" "libcvextern.a" HAVE_IOS ${IS_IOS_BUILD})
#IF(NOT HAVE_IOS)
# IF(HAVE_IOS_I386 OR HAVE_IOS_X86_64 OR HAVE_IOS_ARMV7S OR HAVE_IOS_ARMV7 OR HAVE_IOS_ARM64)
# SET(HAVE_IOS ON)
# ENDIF()
#ENDIF()
#SET(HAVE_IOS_ALL_ARCH OFF)
#IF(HAVE_IOS_I386 AND HAVE_IOS_X86_64 AND HAVE_IOS_ARMV7S AND HAVE_IOS_ARMV7 AND HAVE_IOS_ARM64)
# SET(HAVE_IOS_ALL_ARCH ON)
#ENDIF()
#IF(HAVE_IOS_ALL_ARCH)
# MESSAGE(STATUS "HAVE_IOS_ALL_ARCH: ${HAVE_IOS_ALL_ARCH}")
#ENDIF()
IF(HAVE_IOS)
MESSAGE(STATUS "HAVE_IOS: ON")
ENDIF()
SET(IS_OSX_BUILD OFF)
IF(APPLE AND (NOT IOS))
SET(IS_OSX_BUILD ON)
MESSAGE(STATUS "IS_OSX_BUILD: ${IS_OSX_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/osx" "libcvextern.dylib" HAVE_OSX ${IS_OSX_BUILD})
SET(IS_ANDROID_ARM64_V8A_BUILD OFF)
IF(ANDROID AND ("${ANDROID_ABI}" STREQUAL "arm64-v8a"))
SET(IS_ANDROID_ARM64_V8A_BUILD ON)
MESSAGE(STATUS "IS_ANDROID_ARM64_V8A_BUILD: ${IS_ANDROID_ARM64_V8A_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/android/arm64-v8a" "*.so" HAVE_ANDROID_ARM64_V8A ${IS_ANDROID_ARM64_V8A_BUILD})
#SET(IS_ANDROID_ARMEABI_BUILD OFF)
#IF(ANDROID AND ("${ANDROID_ABI}" STREQUAL "armeabi"))
# SET(IS_ANDROID_ARMEABI_BUILD ON)
# MESSAGE(STATUS "IS_ANDROID_ARMEABI_BUILD: ${IS_ANDROID_ARMEABI_BUILD}")
#ENDIF()
#CHECK_BINARY_EXIST("libs/android/armeabi" "*.so" HAVE_ANDROID_ARMEABI ${IS_ANDROID_ARMEABI_BUILD})
SET(IS_ANDROID_ARMEABI_V7A_BUILD OFF)
IF(ANDROID AND ("${ANDROID_ABI}" STREQUAL "armeabi-v7a"))
SET(IS_ANDROID_ARMEABI_V7A_BUILD ON)
MESSAGE(STATUS "IS_ANDROID_ARMEABI_V7A_BUILD: ${IS_ANDROID_ARMEABI_V7A_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/android/armeabi-v7a" "*.so" HAVE_ANDROID_ARMEABI_V7A ${IS_ANDROID_ARMEABI_V7A_BUILD})
SET(IS_ANDROID_X86_BUILD OFF)
IF(ANDROID AND ("${ANDROID_ABI}" STREQUAL "x86"))
SET(IS_ANDROID_X86_BUILD ON)
MESSAGE(STATUS "IS_ANDROID_X86_BUILD: ${IS_ANDROID_X86_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/android/x86" "*.so" HAVE_ANDROID_X86 ${IS_ANDROID_X86_BUILD})
SET(IS_ANDROID_X86_64_BUILD OFF)
IF(ANDROID AND ("${ANDROID_ABI}" STREQUAL "x86_64"))
SET(IS_ANDROID_X86_64_BUILD ON)
MESSAGE(STATUS "IS_ANDROID_X86_64_BUILD: ${IS_ANDROID_X86_64_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/android/x86_64" "*.so" HAVE_ANDROID_X86_64 ${IS_ANDROID_X86_64_BUILD})
SET(HAVE_ANDROID OFF)
#IF(HAVE_ANDROID_ARM64_V8A OR HAVE_ANDROID_ARMEABI OR HAVE_ANDROID_ARMEABI_V7A OR HAVE_ANDROID_X86 OR HAVE_ANDROID_X86_64)
IF(HAVE_ANDROID_ARM64_V8A OR HAVE_ANDROID_ARMEABI_V7A OR HAVE_ANDROID_X86 OR HAVE_ANDROID_X86_64)
SET(HAVE_ANDROID ON)
ENDIF()
IF(HAVE_ANDROID)
MESSAGE(STATUS "HAVE_ANDROID: ON")
ENDIF()
SET(HAVE_ANDROID_ALL_ARCH OFF)
#IF(HAVE_ANDROID_ARM64_V8A AND HAVE_ANDROID_ARMEABI AND HAVE_ANDROID_ARMEABI_V7A AND HAVE_ANDROID_X86 AND HAVE_ANDROID_X86_64)
IF(HAVE_ANDROID_ARM64_V8A AND HAVE_ANDROID_ARMEABI_V7A AND HAVE_ANDROID_X86 AND HAVE_ANDROID_X86_64)
SET(HAVE_ANDROID_ALL_ARCH ON)
ENDIF()
IF(HAVE_ANDROID_ALL_ARCH)
MESSAGE(STATUS "HAVE_ANDROID_ALL_ARCH: ON")
ENDIF()
SET(IS_WINSTORE_10_X86_BUILD OFF)
IF( ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") AND (CMAKE_SYSTEM_VERSION MATCHES 10.0) AND ("${EMGUCV_ARCH}" STREQUAL "win32") )
SET(IS_WINSTORE_10_X86_BUILD ON)
MESSAGE(STATUS "IS_WINSTORE_10_X86_BUILD: ${IS_WINSTORE_10_X86_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/UWP/x86" "*.dll" HAVE_WINSTORE_10_X86 ${IS_WINSTORE_10_X86_BUILD})
SET(IS_WINSTORE_10_X64_BUILD OFF)
IF( ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") AND (CMAKE_SYSTEM_VERSION MATCHES 10.0) AND ("${EMGUCV_ARCH}" STREQUAL "win64") )
SET(IS_WINSTORE_10_X64_BUILD ON)
MESSAGE(STATUS "IS_WINSTORE_10_X64_BUILD: ${IS_WINSTORE_10_X64_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/UWP/x64" "*.dll" HAVE_WINSTORE_10_X64 ${IS_WINSTORE_10_X64_BUILD})
SET(IS_WINSTORE_10_ARM_BUILD OFF)
IF(("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") AND (CMAKE_SYSTEM_VERSION MATCHES 10.0) AND ("${EMGUCV_ARCH}" STREQUAL "arm"))
SET(IS_WINSTORE_10_ARM_BUILD ON)
MESSAGE(STATUS "IS_WINSTORE_10_ARM_BUILD: ${IS_WINSTORE_10_ARM_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/UWP/arm" "*.dll" HAVE_WINSTORE_10_ARM ${IS_WINSTORE_10_ARM_BUILD})
SET(IS_WINSTORE_10_ARM64_BUILD OFF)
IF(("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") AND (CMAKE_SYSTEM_VERSION MATCHES 10.0) AND ("${EMGUCV_ARCH}" STREQUAL "arm64"))
SET(IS_WINSTORE_10_ARM64_BUILD ON)
MESSAGE(STATUS "IS_WINSTORE_10_ARM64_BUILD: ${IS_WINSTORE_10_ARM64_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/UWP/arm64" "*.dll" HAVE_WINSTORE_10_ARM64 ${IS_WINSTORE_10_ARM64_BUILD})
SET(IS_WINDESKTOP_X86_BUILD OFF)
IF (WIN32 AND ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ("${EMGUCV_ARCH}" STREQUAL "win32") AND (NOT ANDROID))
SET (IS_WINDESKTOP_X86_BUILD ON)
MESSAGE(STATUS "IS_WINDESKTOP_X86_BUILD: ${IS_WINDESKTOP_X86_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/x86" "*.dll" HAVE_WINDESKTOP_X86 ${IS_WINDESKTOP_X86_BUILD})
SET (IS_WINDESKTOP_X64_BUILD OFF)
IF (WIN32 AND ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") AND ("${EMGUCV_ARCH}" STREQUAL "win64") AND (NOT ANDROID))
SET (IS_WINDESKTOP_X64_BUILD ON)
MESSAGE(STATUS "IS_WINDESKTOP_X64_BUILD: ${IS_WINDESKTOP_X64_BUILD}")
ENDIF()
CHECK_BINARY_EXIST("libs/x64" "*.dll" HAVE_WINDESKTOP_X64 ${IS_WINDESKTOP_X64_BUILD})
IF(HAVE_WINDESKTOP_X86 AND HAVE_WINDESKTOP_X64)
SET(WINDESKTOP_LABEL "-windesktop")
ELSEIF(HAVE_WINDESKTOP_X86)
SET(WINDESKTOP_LABEL "-windesktop_x86")
ELSEIF(HAVE_WINDESKTOP_X64)
SET(WINDESKTOP_LABEL "-windesktop_x64")
ELSE()
SET(WINDESKTOP_LABEL "")
ENDIF()
SET(WINSTORE_10_LABEL "")
IF(HAVE_WINSTORE_10_X64)
SET(WINSTORE_10_LABEL "${WINSTORE_10_LABEL}_x64")
ENDIF()
IF(HAVE_WINSTORE_10_X86)
SET(WINSTORE_10_LABEL "${WINSTORE_10_LABEL}_x86")
ENDIF()
IF(HAVE_WINSTORE_10_ARM)
SET(WINSTORE_10_LABEL "${WINSTORE_10_LABEL}_arm")
ENDIF()
IF(HAVE_WINSTORE_10_ARM64)
SET(WINSTORE_10_LABEL "${WINSTORE_10_LABEL}_arm64")
ENDIF()
SET(HAVE_WINSTORE_10 OFF)
IF(HAVE_WINSTORE_10_X86 OR HAVE_WINSTORE_10_X64 OR HAVE_WINSTORE_10_ARM OR HAVE_WINSTORE_10_ARM64)
SET(HAVE_WINSTORE_10 ON)
ENDIF()
IF("${WINSTORE_10_LABEL}" STREQUAL "_x64_x86_arm_arm64")
SET(WINSTORE_10_LABEL "-UWP")
ELSEIF(NOT ("${WINSTORE_10_LABEL}" STREQUAL ""))
SET(WINSTORE_10_LABEL "-UWP${WINSTORE_10_LABEL}")
ENDIF()
SET(WINDOWS_LABEL "${WINSTORE_10_LABEL}${WINDESKTOP_LABEL}")
IF ("${WINDOWS_LABEL}" STREQUAL "-UWP-windesktop")
SET(WINDOWS_LABEL "-windows")
ENDIF()
SET(IOS_LABEL "")
IF(HAVE_IOS)
SET(IOS_LABEL "-ios")
ENDIF()
SET(OSX_LABEL "")
IF(HAVE_OSX)
SET(OSX_LABEL "-osx")
ENDIF()
SET(ANDROID_LABEL "")
IF(HAVE_ANDROID_ARM64_V8A)
SET(ANDROID_LABEL "${ANDROID_LABEL}-arm64-v8a")
ENDIF()
#IF(HAVE_ANDROID_ARMEABI)
# SET(ANDROID_LABEL "${ANDROID_LABEL}-armeabi")
#ENDIF()
IF(HAVE_ANDROID_ARMEABI_V7A)
SET(ANDROID_LABEL "${ANDROID_LABEL}-armeabi-v7a")
ENDIF()
IF(HAVE_ANDROID_X86)
SET(ANDROID_LABEL "${ANDROID_LABEL}-x86")
ENDIF()
IF(HAVE_ANDROID_X86_64)
SET(ANDROID_LABEL "${ANDROID_LABEL}-x86_64")
ENDIF()
#IF("${ANDROID_LABEL}" STREQUAL "-arm64-v8a-armeabi-armeabi-v7a-x86-x86_64")
IF("${ANDROID_LABEL}" STREQUAL "-arm64-v8a-armeabi-v7a-x86-x86_64")
SET(ANDROID_LABEL "-android")
ELSEIF(NOT ("${ANDROID_LABEL}" STREQUAL ""))
SET(ANDROID_LABEL "-android${ANDROID_LABEL}")
ENDIF()
CHECK_BINARY_EXIST("libs" "Emgu.CV.World*" HAVE_PREBUILD_EMGU_CV_WORLD OFF)
# ----------------------------------------------------------------------------
# Setup Package information
# ----------------------------------------------------------------------------
SET(PACKAGE "${PROJECT_NAME}")
SET(CPACK_PACKAGE_CONTACT "Emgu CV SUPPORT <support@emgu.com>")
SET(PACKAGE_BUGREPORT "${CPACK_PACKAGE_CONTACT}")
SET(PACKAGE_NAME "${PROJECT_NAME}")
#SET(CPACK_PACKAGE_NAME "${PACKAGE_NAME}")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Emgu CV is a cross platform .Net wrapper to the OpenCV image processing library.")
SET(CPACK_PACKAGE_NAME "${PACKAGE_NAME}${IOS_LABEL}${ANDROID_LABEL}${WINDOWS_LABEL}${OSX_LABEL}")
#STRING(LENGTH "${CPACK_PACKAGE_NAME}" PACKAGE_NAME_LENGTH)
#IF (${PACKAGE_NAME_LENGTH} GREATER 30)
# SET(CPACK_PACKAGE_NAME "${PACKAGE_NAME}-mixed")
# STRING(LENGTH "${CPACK_PACKAGE_NAME}" PACKAGE_NAME_LENGTH)
#ENDIF()
#IF (APPLE)
# SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-osx")
#ENDIF()
IF(WITH_CUDA)
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-cuda")
ENDIF()
IF(WITH_OPENNI)
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-openni")
ENDIF()
IF(CV_ICC)
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-icc")
ENDIF()
IF(WITH_TBB)
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-tbb")
ENDIF()
IF(WITH_IPP)
SET(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-ipp")
ENDIF()
IF("${CPACK_PACKAGE_NAME}" STREQUAL "${PACKAGE_NAME}-ios-android-windows-osx-icc-tbb-ipp")
SET(CPACK_PACKAGE_NAME "${PACKAGE_NAME}-pro")
ENDIF()
SET(CPACK_PACKAGE_VENDOR "Emgu Corporation")
SET(CPACK_PACKAGE_VERSION_MAJOR ${OPENCV_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENCV_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENCV_VERSION_PATCH})
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.${EMGUCV_GITVERSION}")
IF(ANDROID)
SET(CPACK_PACKAGE_FILE_NAME "lib${CPACK_PACKAGE_NAME}")
ELSE()
SET(CPACK_PACKAGE_FILE_NAME "lib${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
ENDIF()
MESSAGE(STATUS "Package name will be ${CPACK_PACKAGE_NAME}")
FILE(WRITE "emgucv.version.txt" "${CPACK_PACKAGE_VERSION}")
#IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.Commercial.License.txt")
# SET(LICENSE_FILE_NAME "Emgu.CV.Commercial.License.txt")
#ELSE()
SET(LICENSE_FILE_NAME "Emgu.CV.License.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/${LICENSE_FILE_NAME}")
IF (WIN32 OR APPLE)
SET(CPACK_PACKAGE_CLI_FOLDER bin)
ELSE ()
SET(CPACK_PACKAGE_CLI_FOLDER lib/cli/${PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
ENDIF()
# ----------------------------------------------------------------------------
# Build opencv and Emgu.CV.Extern
# ----------------------------------------------------------------------------
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${UNMANAGED_LIBRARY_OUTPUT_PATH}" )
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
#SET(CMAKE_ARCHIEVE_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
#SET(CMAKE_ARCHIEVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_ARCHIEVE_OUTPUT_DIRECTORY}")
#SET(CMAKE_ARCHIEVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_ARCHIEVE_OUTPUT_DIRECTORY}")
#SET(CMAKE_INSTALL_PREFIX_COPY ${CMAKE_INSTALL_PREFIX})
#SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER})
#SET(CPACK_PACKAGING_INSTALL_PREFIX ${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER})
#SET(DESTDIR ${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER})
#SET(CPACK_OUTPUT_FILE_PREFIX "x64")
SET(ENTRYPOINT_CS_STRING "")
SET(ENTRYPOINT_MODULES_STRING "")
#Add opencl
#IF(WIN32 AND (NOT NETFX_CORE) )
# IF(WITH_OPENCL)
# MESSAGE(STATUS "Open CL build included")
# SET(OPENCL_SOURCE_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/lib/opencl-icd-1.2.11.0/icd")
# ADD_SUBDIRECTORY(${OPENCL_SOURCE_FOLDER})
# #GET_TARGET_PROPERTY(OPENCL_OUTPUT_NAME OpenCL OUTPUT_NAME)
# set(OPENCL_FOUND YES)
# set(OPENCL_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/bin/Release/opencl.lib" CACHE STRING "OpenCL library")
# set(OPENCL_INCLUDE_DIR "${OPENCL_SOURCE_FOLDER}/inc" CACHE STRING "OpenCL include directory")
# mark_as_advanced(OPENCL_INCLUDE_DIR OPENCL_LIBRARY)
# SET(ENTRYPOINT_MODULES_STRING "${ENTRYPOINT_MODULES_STRING}
# OpenclLibrary,")
# SET(ENTRYPOINT_CS_STRING "${ENTRYPOINT_CS_STRING}
# /// <summary>
# /// The file name of the OpenCL library
# /// </summary>
# public const string OpenclLibrary = \"OpenCL\";")
# ELSE()
# SET(OPENCL_OUTPUT_NAME "")
# MESSAGE(STATUS "Open CL build not included")
# ENDIF()
#ENDIF()
SET(CMAKE_OLD_SOURCE_DIR ${CMAKE_SOURCE_DIR})
SET(CMAKE_SOURCE_DIR ${OPENCV_SUBFOLDER})
IF(MSVC)
set(ENABLE_SOLUTION_FOLDERS ON CACHE BOOL "Solution folder in Visual Studio")
ENDIF()
ADD_SUBDIRECTORY(${OPENCV_SUBFOLDER})
SET(CMAKE_SOURCE_DIR ${CMAKE_OLD_SOURCE_DIR})
SET (OPENCV_MODULE_NAME_CANDIDATES
core hal imgproc video flann ml imgcodecs videoio highgui objdetect features2d calib3d
cudaarithm cudawarping cudafilters cudaimgproc cudalegacy cudaoptflow
cudastereo cudabgsegm cudafeatures2d cudacodec cudaobjdetect
photo superres
videostab shape
cudev
face ximgproc xobjdetect xfeatures2d xphoto bgsegm optflow
stitching latentsvm plot
dnn dnn_objdetect dnn_superres aruco fuzzy viz bioinspired text tracking
dpm
saliency
dnn_modern
img_hash
phase_unwrapping
freetype
hfs
quality
stereo
surface_matching
)
FOREACH(OPENCV_MODULE_NAME ${OPENCV_MODULE_NAME_CANDIDATES})
IF(TARGET opencv_${OPENCV_MODULE_NAME})
LIST(APPEND OPENCV_MODULE_NAMES ${OPENCV_MODULE_NAME})
ENDIF()
ENDFOREACH()
#IF(NETFX_CORE)
# SET(EMGU_CV_WITH_TESSERACT OFF CACHE BOOL "BUILD TESSERACT OCR")
#ELSE()
SET(EMGU_CV_WITH_TESSERACT ON CACHE BOOL "BUILD TESSERACT OCR")
#ENDIF()
IF(MSVC AND WIN32 AND EMGUCV_WITH_TESSERACT)
SET(TESSERACT_OPENCL OFF CACHE BOOL "ENABLE OpenCL for TESSERACT")
ELSE()
SET(TESSERACT_OPENCL OFF CACHE BOOL "ENABLE OpenCL for TESSERACT")
ENDIF()
IF(TESSERACT_OPENCL)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/lib/opencl-icd-1.2.11.0/icd)
ENDIF()
IF (TARGET_ARCH_64)
SET(EMGU_ENABLE_SSE OFF CACHE BOOL "ENABLE SSE for Emgu CV")
ELSE()
SET(EMGU_ENABLE_SSE ON CACHE BOOL "ENABLE SSE for Emgu CV")
ENDIF()
ADD_SUBDIRECTORY(Emgu.CV.Extern)
ADD_SUBDIRECTORY(Emgu.CV.NativeImage)
IF(NOT (ANDROID OR IOS OR NETFX_CORE))
ENABLE_TESTING()
ADD_SUBDIRECTORY(tests/cvextern_test)
ENDIF()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${LIBRARY_OUTPUT_PATH}" )
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
#SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_COPY})
#SET(CPACK_PACKAGING_INSTALL_PREFIX "")
#SET(DESTDIR "")
#SET(CPACK_OUTPUT_FILE_PREFIX "")
SET(EMGU_CV_BUILD ON CACHE BOOL "BUILD Emgu CV")
SET(EMGU_CV_EXAMPLE_BUILD ON CACHE BOOL "Build Emgu CV Example")
# ----------------------------------------------------------------------------
# Generate required common assembly file for Emgu CV project
# ----------------------------------------------------------------------------
INCLUDE(Today)
TODAY() #set the variable CURRENT_YEAR
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CommonAssemblyInfo.cs.in ${CMAKE_CURRENT_SOURCE_DIR}/CommonAssemblyInfo.cs)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.Extern/version.rc)
MACRO(CHECK_LICENSE_TYPE)
MESSAGE(STATUS "LICENSE FILE: ${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.License.txt")
IF (WIN32)
EXECUTE_PROCESS(COMMAND "findstr" "gpl" "Emgu.CV.License.txt" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE TMP)
ELSE()
EXECUTE_PROCESS(COMMAND "grep" "gpl" "Emgu.CV.License.txt" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE TMP)
ENDIF()
STRING(STRIP "${TMP}" TMP)
STRING(LENGTH "${TMP}" GPL_LICENSE_LENGTH)
SET (LICENSE_TYPE "OpenSource")
SET (EMGUCV_LICENSE_FILE "Emgu.CV.License.txt")
#SET (EMGUCV_LICENSE_URL "https://www.gnu.org/licenses/gpl-3.0.txt")
IF(${GPL_LICENSE_LENGTH} EQUAL 0)
SET(LICENSE_TYPE "Commercial")
#SET (EMGUCV_LICENSE_URL "http://www.emgu.com/wiki/files/Emgu.CV.Commercial.License.4.0.pdf")
ENDIF()
MESSAGE(STATUS "LICENSE_TYPE: ${LICENSE_TYPE}")
ENDMACRO()
CHECK_LICENSE_TYPE()
# ----------------------------------------------------------------------------
# Generate neget packaging file for Emgu CV project
# ----------------------------------------------------------------------------
SET(EMGUCV_NUGET_ID "Emgu.CV")
SET(EMGUCV_WINDOWS_NUGET_ID "${EMGUCV_NUGET_ID}.runtime.windows")
#SET(
IF(WITH_CUDA)
SET(EMGUCV_WINDOWS_NUGET_ID "${EMGUCV_WINDOWS_NUGET_ID}.cuda")
#SET(EMGUCV_NUGET_ID "${EMGUCV_NUGET_ID_BASE}-CUDA")
#SET(EMGU_CUDA_NUGET_ID "${EMGUCV_NUGET_ID}.Native")
SET(EMGU_NPP_NUGET_ID "${EMGUCV_WINDOWS_NUGET_ID}.npp")
SET(EMGU_CUFFT_NUGET_ID "${EMGUCV_WINDOWS_NUGET_ID}.cufft")
SET(EMGU_CUDNN_NUGET_ID "${EMGUCV_WINDOWS_NUGET_ID}.dnn")
#ELSE()
# SET(EMGUCV_NUGET_ID "${EMGUCV_NUGET_ID_BASE}")
ENDIF()
IF(HAVE_OSX)
SET(EMGUCV_MACOS_NUGET_ID "${EMGUCV_NUGET_ID}.runtime.macos")
ENDIF()
IF(HAVE_ANDROID_ALL_ARCH AND WIN32)
SET(EMGUCV_ANDROID_NUGET_ID "${EMGUCV_NUGET_ID}.runtime.android")
ENDIF()
IF(HAVE_IOS AND WIN32)
SET(EMGUCV_IOS_NUGET_ID "${EMGUCV_NUGET_ID}.runtime.ios")
ENDIF()
IF(HAVE_WINSTORE_10 AND WIN32)
SET(EMGUCV_UWP_NUGET_ID "${EMGUCV_NUGET_ID}.runtime.uwp")
ENDIF()
IF ("${LICENSE_TYPE}" STREQUAL "Commercial")
MESSAGE(STATUS "Configuring nuget package for Commercial release")
SET(EMGUCV_NUGET_ID "${EMGUCV_NUGET_ID}-CR")
IF(HAVE_OSX)
SET(EMGUCV_MACOS_NUGET_ID "${EMGUCV_MACOS_NUGET_ID}-CR")
ENDIF()
IF(HAVE_ANDROID_ALL_ARCH AND WIN32)
SET(EMGUCV_ANDROID_NUGET_ID "${EMGUCV_ANDROID_NUGET_ID}-CR")
ENDIF()
IF(HAVE_IOS AND WIN32)
SET(EMGUCV_IOS_NUGET_ID "${EMGUCV_IOS_NUGET_ID}-CR")
ENDIF()
IF(HAVE_WINSTORE_10 AND WIN32)
SET(EMGUCV_UWP_NUGET_ID "${EMGUCV_UWP_NUGET_ID}-CR")
ENDIF()
IF(HAVE_WINDESKTOP_X64 OR HAVE_WINDESKTOP_X86)
SET(EMGUCV_WINDOWS_NUGET_ID "${EMGUCV_WINDOWS_NUGET_ID}-CR")
ENDIF()
ELSEIF()
MESSAGE(STATUS "Configuring nuget package for Open Source release")
ENDIF()
SET(EMGUCV_WINDOWS_NUGET_FILE_LIST "")
IF(HAVE_WINDESKTOP_X86)
SET(EMGUCV_WINDOWS_NUGET_FILE_LIST "${EMGUCV_WINDOWS_NUGET_FILE_LIST} <file src=\"..\\..\\..\\libs\\x86\\*.dll\" exclude=\"..\\..\\..\\libs\\x86\\cu*.dll;..\\..\\..\\libs\\x86\\npp*.dll\" target=\"build\\x86\" />")
ENDIF()
IF(HAVE_WINDESKTOP_X64)
SET(EMGUCV_WINDOWS_NUGET_FILE_LIST "${EMGUCV_WINDOWS_NUGET_FILE_LIST} <file src=\"..\\..\\..\\libs\\x64\\*.dll\" exclude=\"..\\..\\..\\libs\\x64\\cu*.dll;..\\..\\..\\libs\\x64\\npp*.dll\" target=\"build\\x64\" />")
ENDIF()
IF(HAVE_WINDESKTOP_X86 OR HAVE_WINDESKTOP_X64)
SET(EMGUCV_WINDOWS_NUGET_FILE_LIST "${EMGUCV_WINDOWS_NUGET_FILE_LIST}
<file src=\"Emgu.CV.runtime.windows.targets\" target=\"build\\${EMGUCV_WINDOWS_NUGET_ID}.targets\" />
<file src=\"..\\..\\..\\libs\\Emgu.CV.UI.dll\" target=\"lib\\net461\" />
<file src=\"..\\..\\..\\libs\\Emgu.CV.UI.xml\" target=\"lib\\net461\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"..\\..\\..\\${EMGUCV_LICENSE_FILE}\" target=\"\" />")
ENDIF()
SET(EMGUCV_MACOS_NUGET_FILE_LIST "")
IF(HAVE_OSX)
SET(EMGUCV_MACOS_NUGET_FILE_LIST "${EMGUCV_MACOS_NUGET_FILE_LIST}
<file src=\"Emgu.CV.runtime.macos.targets\" target=\"build\\${EMGUCV_MACOS_NUGET_ID}.targets\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"..\\..\\..\\${EMGUCV_LICENSE_FILE}\" target=\"\" />")
SET(EMGUCV_MACOS_NUGET_DEPENDENCY "
<dependencies>
<dependency id=\"${EMGUCV_NUGET_ID}\" version=\"[${CPACK_PACKAGE_VERSION}]\" />
</dependencies>")
ENDIF()
SET(EMGUCV_UWP_NUGET_FILE_LIST "")
IF(HAVE_WINSTORE_10_X86)
SET(EMGUCV_UWP_NUGET_FILE_LIST "${EMGUCV_UWP_NUGET_FILE_LIST} <file src=\"..\\..\\..\\libs\\UWP\\x86\\*.dll\" target=\"build\\UWP\\x86\" />")
ENDIF()
IF(HAVE_WINSTORE_10_X64)
SET(EMGUCV_UWP_NUGET_FILE_LIST "${EMGUCV_UWP_NUGET_FILE_LIST} <file src=\"..\\..\\..\\libs\\UWP\\x64\\*.dll\" target=\"build\\UWP\\x64\" />")
ENDIF()
IF(HAVE_WINSTORE_10_ARM)
SET(EMGUCV_UWP_NUGET_FILE_LIST "${EMGUCV_UWP_NUGET_FILE_LIST} <file src=\"..\\..\\..\\libs\\UWP\\arm\\*.dll\" target=\"build\\UWP\\arm\" />")
ENDIF()
IF(HAVE_WINSTORE_10_ARM64)
SET(EMGUCV_UWP_NUGET_FILE_LIST "${EMGUCV_UWP_NUGET_FILE_LIST} <file src=\"..\\..\\..\\libs\\UWP\\arm64\\*.dll\" target=\"build\\UWP\\arm64\" />")
ENDIF()
IF(HAVE_WINSTORE_10)
SET(EMGUCV_UWP_NUGET_DEPENDENCY "
<dependencies>
<dependency id=\"${EMGUCV_NUGET_ID}\" version=\"[${CPACK_PACKAGE_VERSION}]\" />
</dependencies>")
SET(EMGUCV_UWP_NUGET_FILE_LIST "${EMGUCV_UWP_NUGET_FILE_LIST}
<file src=\"Emgu.CV.runtime.uwp.targets\" target=\"build\\${EMGUCV_UWP_NUGET_ID}.targets\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"..\\..\\..\\${EMGUCV_LICENSE_FILE}\" target=\"\" />")
ENDIF()
SET(EMGUCV_NUGET_FILE_LIST "")
SET(EMGUCV_NUGET_FILE_LIST "${EMGUCV_NUGET_FILE_LIST}
<file src=\"..\\..\\..\\libs\\Emgu.CV.World.NetStandard.dll\" target=\"lib\\netstandard2.0\" />
<file src=\"..\\..\\..\\libs\\Emgu.CV.World.NetStandard.xml\" target=\"lib\\netstandard2.0\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"..\\..\\..\\${EMGUCV_LICENSE_FILE}\" target=\"\" />")
SET(EMGUCV_NUGET_TITLE_ARCH "")
IF(HAVE_WINDESKTOP_X86)
SET(EMGUCV_NUGET_TITLE_ARCH "${EMGUCV_NUGET_TITLE_ARCH} x86")
ENDIF()
IF(HAVE_WINDESKTOP_X64)
SET(EMGUCV_NUGET_TITLE_ARCH "${EMGUCV_NUGET_TITLE_ARCH} x64")
ENDIF()
STRING(STRIP "${EMGUCV_NUGET_TITLE_ARCH}" EMGUCV_NUGET_TITLE_ARCH)
STRING(REPLACE "x86 x64" "" EMGUCV_NUGET_TITLE_ARCH "${EMGUCV_NUGET_TITLE_ARCH}")
SET(EMGUCV_WINDOWS_NUGET_TITLE "EMGU CV ${EMGUCV_NUGET_TITLE_ARCH}")
#SET(EMGUCV_WINDOWS_NUGET_TITLE "EMGU CV ${EMGUCV_NUGET_TITLE_ARCH}")
STRING(STRIP "${EMGUCV_WINDOWS_NUGET_TITLE}" EMGUCV_WINDOWS_NUGET_TITLE)
SET(EMGUCV_WINDOWS_NET461_NUGET_DEPENDENCY "<dependency id=\"ZedGraph\" version=\"[5.1.7]\" />")
SET(EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY "<dependency id=\"${EMGUCV_NUGET_ID}\" version=\"[${CPACK_PACKAGE_VERSION}]\" />")
#SET(EMGUCV_WINDOWS_NUGET_DEPENDENCY "<group targetFramework=\"net461\"><dependency id=\"ZedGraph\" version=\"[5.1.7]\" /></group>")
IF(WITH_CUDA)
SET(EMGUCV_WINDOWS_NUGET_TITLE "${EMGUCV_WINDOWS_NUGET_TITLE} with CUDA support")
SET(EMGU_CUDA_NUGET_TITLE "Native x64 CUDA dependency for EMGU CV")
SET(EMGU_CUDA_NPP_NUGET_FILE_LIST "<file src=\"${EMGU_NPP_NUGET_ID}.targets\" target=\"build\\${EMGU_NPP_NUGET_ID}.targets\" />")
SET(EMGU_CUDA_VERSION "${npp_major}.${npp_minor}.${npp_build}")
IF ( (${cuda_major}) AND (${cuda_minor}) )
SET(EMGU_CUDA_VERSION "${cuda_major}.${cuda_minor}.${npp_build}")
ENDIF()
SET(EMGU_CUFFT_VERSION "${EMGU_CUDA_VERSION}")
SET(EMGU_CUFFT_NUGET_TITLE "Native x64 CUDA CUFFT dependency for EMGU CV")
SET(EMGU_CUFFT_NUGET_FILE_LIST "<file src=\"${EMGU_CUFFT_NUGET_ID}.targets\" target=\"build\\${EMGU_CUFFT_NUGET_ID}.targets\" />")
SET(EMGU_CUDNN_VERSION "${CUDNN_MAJOR_VERSION}.${CUDNN_MINOR_VERSION}.${CUDNN_PATCH_VERSION}")
SET(EMGU_CUDNN_NUGET_TITLE "Native x64 CUDA DNN dependency for EMGU CV")
SET(EMGU_CUDNN_NUGET_FILE_LIST "<file src=\"${EMGU_CUDNN_NUGET_ID}.targets\" target=\"build\\${EMGU_CUDNN_NUGET_ID}.targets\" />")
SET(EMGU_NPP_VERSION "${EMGU_CUDA_VERSION}")
SET(EMGU_NPP_NUGET_TITLE "Native x64 CUDA dependency for EMGU CV")
SET(EMGU_NPP_NUGET_FILE_LIST "<file src=\"${EMGU_NPP_NUGET_ID}.targets\" target=\"build\\${EMGU_NPP_NUGET_ID}.targets\" />")
#SET(EMGUCV_NUGET_DEPENDENCY "${EMGUCV_NUGET_DEPENDENCY} <dependency id=\"${EMGUCV_WINDOWS_NUGET_ID}\" version=\"[${EMGU_CUDA_VERSION}]\" />")
IF (WITH_CUDNN)
SET(EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY "${EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY}<dependency id=\"${EMGU_CUDNN_NUGET_ID}\" version=\"[${EMGU_CUDNN_VERSION}]\" />")
ENDIF()
IF (WITH_CUDA)
SET(EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY "${EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY}<dependency id=\"${EMGU_CUFFT_NUGET_ID}\" version=\"[${EMGU_CUFFT_VERSION}]\" />")
SET(EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY "${EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY}<dependency id=\"${EMGU_NPP_NUGET_ID}\" version=\"[${EMGU_NPP_VERSION}]\" />")
ENDIF()
IF(HAVE_WINDESKTOP_X64)
file(COPY "${CUDA_TOOLKIT_ROOT_DIR}/EULA.txt" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.windows.cuda.npp")
file(COPY "${CUDA_TOOLKIT_ROOT_DIR}/EULA.txt" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.windows.cuda.cufft")
#file(COPY "${CUDA_TOOLKIT_ROOT_DIR}/EULA.txt" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Cudnn")
SET(EMGU_CUDA_NPP_NUGET_FILE_LIST "${EMGU_CUDA_NPP_NUGET_FILE_LIST}
<file src=\"..\\..\\..\\libs\\x64\\cu*.dll\" exclude=\"..\\..\\..\\libs\\x64\\cufft*.dll;..\\..\\..\\libs\\x64\\cudnn*.dll\" target=\"build\\x64\" />
<file src=\"..\\..\\..\\libs\\x64\\npp*.dll\" target=\"build\\x64\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"EULA.txt\" target=\"CUDA_EULA.txt\" />")
SET(EMGU_CUFFT_NUGET_FILE_LIST "${EMGU_CUFFT_NUGET_FILE_LIST}
<file src=\"..\\..\\..\\libs\\x64\\cufft*.dll\" target=\"build\\x64\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"EULA.txt\" target=\"CUDA_EULA.txt\" />")
SET(EMGU_CUDNN_NUGET_FILE_LIST "${EMGU_CUDNN_NUGET_FILE_LIST}
<file src=\"..\\..\\..\\libs\\x64\\cudnn*.dll\" target=\"build\\x64\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"NVIDIA_SLA_cuDNN_Support.txt\" target=\"cuDNN_SLA.txt\" />")
ENDIF()
SET(NUGET_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
#MESSAGE(STATUS "<<<<<<<<<<<<<<<< npp_major: ${npp_major} >>>>>>>>>>>>>>>>>>>>>> ")
#MESSAGE(STATUS "<<<<<<<<<<<<<<<< npp_minor: ${npp_minor} >>>>>>>>>>>>>>>>>>>>>> ")
#MESSAGE(STATUS "<<<<<<<<<<<<<<<< npp_build: ${npp_build} >>>>>>>>>>>>>>>>>>>>>> ")
IF ( (${cuda_major}) AND (${cuda_minor}) )
SET(CUDA_VERSION_NUMERIC_ONLY "${cuda_major}${cuda_minor}")
ELSE()
SET(CUDA_VERSION_NUMERIC_ONLY "${npp_major}${npp_minor}")
ENDIF()
IF((${npp_major} GREATER 10) OR (("${npp_major}" STREQUAL "10") AND (${npp_minor} GREATER 0)))
IF (${cuda_major})
SET(CUFFT_POSTFIX "${cuda_major}")
else()
SET(CUFFT_POSTFIX "${npp_major}")
endif()
ELSE()
SET(CUFFT_POSTFIX "${npp_major}${npp_minor}")
ENDIF()
#MESSAGE(STATUS "<<<<<<<<<<<<<<<< CUDA_VERSION_NUMERIC_ONLY: ${CUDA_VERSION_NUMERIC_ONLY} >>>>>>>>>>>>>>>>>>>>>> ")
#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.runtime.windows.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.windows/Package.nuspec)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EMGU_CUFFT_NUGET_ID}.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/${EMGU_CUFFT_NUGET_ID}/Package.nuspec)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EMGU_CUDNN_NUGET_ID}.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/${EMGU_CUDNN_NUGET_ID}/Package.nuspec)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EMGU_NPP_NUGET_ID}.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/${EMGU_NPP_NUGET_ID}/Package.nuspec)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EMGU_CUFFT_NUGET_ID}.targets.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/${EMGU_CUFFT_NUGET_ID}/${EMGU_CUFFT_NUGET_ID}.targets)
#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.runtime.windows.targets.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.windows/${EMGUCV_WINDOWS_NUGET_ID}.targets)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EMGU_CUDNN_NUGET_ID}.targets.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/${EMGU_CUDNN_NUGET_ID}/${EMGU_CUDNN_NUGET_ID}.targets)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${EMGU_NPP_NUGET_ID}.targets.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/${EMGU_NPP_NUGET_ID}/${EMGU_NPP_NUGET_ID}.targets)
ENDIF()
SET(EMGUCV_WINDOWS_NUGET_DEPENDENCY " <dependencies>
<group targetFramework=\"net461\">${EMGUCV_WINDOWS_NET461_NUGET_DEPENDENCY}${EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY}</group>
<group targetFramework=\"netstandard2.0\">${EMGUCV_WINDOWS_NETSTANDARD_NUGET_DEPENDENCY}</group>
</dependencies>")
IF(HAVE_ANDROID_ALL_ARCH AND WIN32)
SET(EMGUCV_ANDROID_NUGET_TITLE "Emgu CV for Android Native Runtime")
SET(EMGUCV_ANDROID_NUGET_FILE_LIST "
<file src=\"..\\..\\..\\libs\\Emgu.CV.Runtime.Android.dll\" target=\"lib\\MonoAndroid50\" />
<file src=\"..\\..\\..\\libs\\Emgu.CV.Runtime.Android.xml\" target=\"lib\\MonoAndroid50\" />")
SET(EMGUCV_ANDROID_NUGET_FILE_LIST "${EMGUCV_ANDROID_NUGET_FILE_LIST}
<file src=\"Emgu.CV.runtime.android.targets\" target=\"build\\${EMGUCV_ANDROID_NUGET_ID}.targets\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"..\\..\\..\\${LICENSE_FILE_NAME}\" target=\"\" />")
SET(EMGUCV_ANDROID_NUGET_DEPENDENCY "
<dependencies>
<dependency id=\"${EMGUCV_NUGET_ID}\" version=\"[${CPACK_PACKAGE_VERSION}]\" />
</dependencies>")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.runtime.android.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.android/Package.nuspec)
ENDIF()
IF(HAVE_IOS AND WIN32)
SET(EMGUCV_IOS_NUGET_TITLE "Emgu CV for iOS")
SET(EMGUCV_IOS_NUGET_FILE_LIST "
<file src=\"..\\..\\..\\libs\\Emgu.CV.World.IOS.dll\" target=\"lib\\Xamarin.iOS10\" />
<file src=\"..\\..\\..\\libs\\Emgu.CV.World.IOS.XML\" target=\"lib\\Xamarin.iOS10\" />")
SET(EMGUCV_IOS_NUGET_FILE_LIST "${EMGUCV_IOS_NUGET_FILE_LIST}
<file src=\"Emgu.CV.runtime.ios.targets\" target=\"build\\${EMGUCV_IOS_NUGET_ID}.targets\" />
<file src=\"..\\..\\..\\miscellaneous\\nuget_icon.png\" target=\"icon.png\" />
<file src=\"..\\..\\..\\${LICENSE_FILE_NAME}\" target=\"\" />")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.runtime.ios.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.ios/Package.nuspec)
ENDIF()
IF(HAVE_OSX)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.runtime.macos.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.macos/Package.nuspec)
ENDIF()
IF(HAVE_WINSTORE_10)
SET(EMGUCV_UWP_NUGET_TITLE "Emgu CV for UWP Native Runtime")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.runtime.uwp.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.uwp/Package.nuspec)
ENDIF()
IF(HAVE_WINDESKTOP_X86 OR HAVE_WINDESKTOP_X64)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.runtime.windows.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV.runtime.windows/Package.nuspec)
ENDIF()
SET(EMGUCV_NUGET_SUMMARY "Emgu CV is a cross platform .Net wrapper to the OpenCV image processing library.")
IF ("${LICENSE_TYPE}" STREQUAL "Commercial")
SET(EMGUCV_NUGET_TITLE "${EMGUCV_NUGET_TITLE} Commercial Release")
SET(EMGUCV_NUGET_SUMMARY "${EMGUCV_NUGET_SUMMARY} This is the commercial release.")
IF(HAVE_ANDROID_ALL_ARCH AND WIN32)
SET(EMGUCV_ANDROID_NUGET_TITLE "${EMGUCV_ANDROID_NUGET_TITLE} Commercial Release")
ENDIF()
IF(HAVE_WINSTORE_10)
SET(EMGUCV_UWP_NUGET_TITLE "${EMGUCV_UWP_NUGET_TITLE} Commercial Release")
ENDIF()
ENDIF()
#generate nuget config file for Emgu.CV
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emgu.CV.Package.nuspec.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/nuget/Emgu.CV/Package.nuspec)
#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/component.yaml.in ${CMAKE_CURRENT_SOURCE_DIR}/platforms/xamarin/emgucv_v3/component/component.yaml)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Example.Android.AndroidManifest.xml.in ${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.Example/Android/Properties/AndroidManifest.xml @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/XamarinForms.Android.AndroidManifest.xml.in ${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.Example/XamarinForms/Android/Properties/AndroidManifest.xml @ONLY)
# ----------------------------------------------------------------------------
# Generate readme file for Emgu CV project
# ----------------------------------------------------------------------------
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/README.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV/README.txt)
INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV/README.txt" DESTINATION "." COMPONENT libs)
# ----------------------------------------------------------------------------
# Generate CvInvokeEntryPoints.cs file for Emgu CV project
# ----------------------------------------------------------------------------
SET(OPENCV_LIBRARY_OUTPUT_NAME_PREFIX "")
IF (APPLE)
SET(OPENCV_LIBRARY_OUTPUT_NAME_POSTFIX ".${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")
ELSE()
SET(OPENCV_LIBRARY_OUTPUT_NAME_POSTFIX "")
ENDIF()
SET(OPENCV_LIBRARY_OUTPUT_NAMES )
FOREACH(OPENCV_MODULE_NAME ${OPENCV_MODULE_NAME_CANDIDATES})
STRING (TOUPPER "${OPENCV_MODULE_NAME}" OPENCV_MODULE_NAME_UPPER)
STRING (SUBSTRING "${OPENCV_MODULE_NAME}" 0 1 OPENCV_MODULE_NAME_FIRST_LETTER)
STRING (TOUPPER "${OPENCV_MODULE_NAME_FIRST_LETTER}" OPENCV_MODULE_NAME_FIRST_LETTER_UPPER)
STRING (SUBSTRING "${OPENCV_MODULE_NAME}" 1 -1 OPENCV_MODULE_NAME_REMAINDER)
SET(OPENCV_MODULE_NAME_FIRST_LETTER_UPPER "${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}${OPENCV_MODULE_NAME_REMAINDER}")
SET(OPENCV_OUTPUT_PROJ_TYPE "")
IF(NOT (TARGET opencv_${OPENCV_MODULE_NAME}))
SET(OPENCV_${OPENCV_MODULE_NAME_UPPER}_OUTPUT_NAME "")
ELSE()
#MESSAGE( STATUS "opencv_${OPENCV_MODULE_NAME} type: ${OPENCV_OUTPUT_PROJ_TYPE}")
GET_TARGET_PROPERTY(OPENCV_OUTPUT_PROJ_TYPE opencv_${OPENCV_MODULE_NAME} TYPE)
IF(NOT ("${OPENCV_OUTPUT_PROJ_TYPE}" STREQUAL "SHARED_LIBRARY"))
SET(OPENCV_${OPENCV_MODULE_NAME_UPPER}_OUTPUT_NAME "")
ELSE()
GET_TARGET_PROPERTY(OPENCV_OUTPUT_NAME_TMP opencv_${OPENCV_MODULE_NAME} OUTPUT_NAME)
SET(OPENCV_${OPENCV_MODULE_NAME_UPPER}_OUTPUT_NAME ${OPENCV_LIBRARY_OUTPUT_NAME_PREFIX}${OPENCV_OUTPUT_NAME_TMP}${OPENCV_LIBRARY_OUTPUT_NAME_POSTFIX})
LIST(APPEND OPENCV_LIBRARY_OUTPUT_NAMES ${OPENCV_${OPENCV_MODULE_NAME_UPPER}_OUTPUT_NAME})
SET(ENTRYPOINT_MODULES_STRING "${ENTRYPOINT_MODULES_STRING}
Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library,")
ENDIF()
ENDIF()
IF(IOS)
SET(ENTRYPOINT_CS_STRING "${ENTRYPOINT_CS_STRING}
/// <summary>
/// The file name of the ${OPENCV_MODULE_NAME} library
/// </summary>
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"__Internal\";")
ELSEIF(((WIN32 AND NOT ANDROID) OR APPLE))
IF(("${OPENCV_OUTPUT_PROJ_TYPE}" STREQUAL "SHARED_LIBRARY"))
SET(ANDROID_ENTRYPOINT "opencv_${OPENCV_MODULE_NAME}")
SET(OSX_ENTRYPOINT "opencv_${OPENCV_MODULE_NAME}.${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")
SET(OSX_UNITY_STANDALONE_ENTRYPOINT "@executable_path/../Plugins/emgucv.bundle/Contents/MacOS/lib${OSX_ENTRYPOINT}.dylib")
SET(OSX_UNITY_EDITOR_ENTRYPOINT "Assets/Plugins/emgucv.bundle/Contents/MacOS/lib${OSX_ENTRYPOINT}.dylib")
SET(WINDOWS_ENTRYPOINT "opencv_${OPENCV_MODULE_NAME}${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
SET(IOS_ENTRYPOINT "__Internal")
IF("${OPENCV_${OPENCV_MODULE_NAME_UPPER}_OUTPUT_NAME}" STREQUAL "")
SET(ANDROID_ENTRYPOINT "")
SET(OSX_ENTRYPOINT "")
SET(OSX_UNITY_ENTRYPOINT "emgucv")
SET(WINDOWS_ENTRYPOINT "")
SET(IOS_ENTRYPOINT "")
ENDIF()
SET(ENTRYPOINT_CS_STRING "${ENTRYPOINT_CS_STRING}
/// <summary>
/// The file name of the ${OPENCV_MODULE_NAME} library
/// </summary>
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"${WINDOWS_ENTRYPOINT}\";
#elif UNITY_EDITOR_OSX
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"${OSX_UNITY_EDITOR_ENTRYPOINT}\";
#elif UNITY_STANDALONE_OSX
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"${OSX_UNITY_STANDALONE_ENTRYPOINT}\";
#elif __IOS__ || UNITY_IPHONE
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"${IOS_ENTRYPOINT}\";
#elif __ANDROID__ || UNITY_ANDROID
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"${ANDROID_ENTRYPOINT}\";
#else
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"${OPENCV_${OPENCV_MODULE_NAME_UPPER}_OUTPUT_NAME}\";
#endif
")
ENDIF()
ELSE()
IF("${OPENCV_OUTPUT_PROJ_TYPE}" STREQUAL "SHARED_LIBRARY")
SET(ENTRYPOINT_CS_STRING "${ENTRYPOINT_CS_STRING}
/// <summary>
/// The file name of the ${OPENCV_MODULE_NAME} library
/// </summary>
public const string Opencv${OPENCV_MODULE_NAME_FIRST_LETTER_UPPER}Library = \"${OPENCV_${OPENCV_MODULE_NAME_UPPER}_OUTPUT_NAME}\";")
ENDIF()
ENDIF()
ENDFOREACH()
SET(ENTRYPOINT_MODULES_STRING "public static List<String> OpenCVModuleList = new List<String>
{
#if !(__ANDROID__ || __IOS__ || UNITY_IPHONE || UNITY_ANDROID || NETFX_CORE)
OpencvFFMpegLibrary,
#endif
${ENTRYPOINT_MODULES_STRING}
ExternLibrary
};
")
GET_TARGET_PROPERTY(CVEXTERN_OUTPUT_NAME cvextern OUTPUT_NAME)
LIST(APPEND OPENCV_LIBRARY_OUTPUT_NAMES ${CVEXTERN_OUTPUT_NAME})
if(WIN32 AND WITH_FFMPEG)
if(TARGET_ARCH_64)
set(FFMPEG_SUFFIX _64)
endif()
#STRING(LENGTH "${OPENCV_CORE_OUTPUT_NAME}" temp)
#MATH(EXPR temp "${temp}-3")
#STRING(SUBSTRING ${OPENCV_CORE_OUTPUT_NAME} ${temp} -1 OPENCV_DLLVERSION)
set(OPENCV_FFMPEG_OUTPUT_NAME "opencv_videoio_ffmpeg${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}${FFMPEG_SUFFIX}")
#set(OPENCV_FFMPEG_OUTPUT_NAME "opencv_ffmpeg${FFMPEG_SUFFIX}")
MESSAGE(STATUS "OPENCV_FFMPEG_OUTPUT_NAME: ${OPENCV_FFMPEG_OUTPUT_NAME}")
LIST(APPEND OPENCV_LIBRARY_OUTPUT_NAMES ${OPENCV_FFMPEG_OUTPUT_NAME})
endif()
IF(TARGET_ARCH_64)
SET(UNMANAGED_CODE_BITNESS "64")
ELSE()
SET(UNMANAGED_CODE_BITNESS "32")
ENDIF()
#IF(ANDROID)
# SET(CVINVOKE_ENTRYPOINTS_FILE_SUBFOLDER "Android/")
#ELSE()
SET(CVINVOKE_ENTRYPOINTS_FILE_SUBFOLDER "")
#ENDIF()
IF(IOS)
SET(CVEXTERN_OUTPUT_NAME "__Internal")
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CvInvokeEntryPoints.cs.in ${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV/PInvoke/${CVINVOKE_ENTRYPOINTS_FILE_SUBFOLDER}CvInvokeEntryPoints.cs)
# ----------------------------------------------------------------------------
# Build the managed dlls of Emgu CV
# ----------------------------------------------------------------------------
#IF(NOT IOS)
ADD_SUBDIRECTORY(Emgu.Util)
ADD_SUBDIRECTORY(Emgu.CV)
ADD_SUBDIRECTORY(Emgu.CV.UI)
ADD_SUBDIRECTORY(Emgu.CV.Example)
#ADD_SUBDIRECTORY(Emgu.UI)
ADD_SUBDIRECTORY(Emgu.CV.Test)
ADD_SUBDIRECTORY(Emgu.CV.Cuda)
IF (EMGU_CV_WITH_TESSERACT)
ADD_SUBDIRECTORY(Emgu.CV.OCR)
ENDIF()
ADD_SUBDIRECTORY(Emgu.CV.Contrib)
# IF(NOT (NETFX_CORE OR ANDROID))
# ADD_SUBDIRECTORY(Emgu.CV.UI.GL)
# ENDIF()
ADD_SUBDIRECTORY(Emgu.CV.World)
#ENDIF()
ADD_SUBDIRECTORY(Emgu.CV.Runtime)
#IF(WIN32)
ADD_SUBDIRECTORY(platforms/nuget)
#ENDIF()
IF(HAVE_ANDROID)
INSTALL(
FILES
"Solution/Android/Emgu.CV.Android.Example.sln"
"Solution/Android/Emgu.CV.Android.sln"
DESTINATION "Solution/Android"
COMPONENT emgucv_example_source
)
INSTALL(
FILES
"opencv/LICENSE"
DESTINATION "opencv"
COMPONENT emgucv_example_source
)
ENDIF()
IF(HAVE_IOS)
INSTALL(
FILES
"Solution/iOS/Emgu.CV.iOS.Example.sln"
"Solution/iOS/Emgu.CV.iOS.sln"
DESTINATION "Solution/iOS"
COMPONENT emgucv_example_source
)
ENDIF()
IF(HAVE_OSX)
INSTALL(
FILES
"Solution/Mac/Emgu.CV.Mac.Example.sln"
DESTINATION "Solution/Mac"
COMPONENT emgucv_example_source
)
IF (NOT IS_OSX_BUILD)
INSTALL(
FILES
"libs/osx/libcvextern.dylib"
DESTINATION "libs/osx"
COMPONENT emgucv_binary
)
ENDIF()
ENDIF()
INSTALL(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.snk"
"${CMAKE_CURRENT_SOURCE_DIR}/CommonAssemblyInfo.cs"
"${CMAKE_CURRENT_SOURCE_DIR}/${LICENSE_FILE_NAME}"
"${CMAKE_CURRENT_SOURCE_DIR}/nuget.config"
"${CMAKE_CURRENT_SOURCE_DIR}/components.config"
DESTINATION .
COMPONENT emgucv_source
)
IF (EMGU_CV_WITH_FREETYPE)
IF (ANDROID)
#INSTALL(EXPORT freetype DESTINATION lib)
ENDIF()
ENDIF()
IF (ANDROID)
SET(CPACK_GENERATOR ZIP)
ELSEIF (WIN32)
IF(NETFX_CORE)
SET(CPACK_GENERATOR ZIP)
ELSE()
#SET(CPACK_GENERATOR ZIP)
SET(CPACK_GENERATOR NSIS;ZIP)
ENDIF()
SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON) #enable components install for zip
IF(CPACK_GENERATOR MATCHES "ZIP")
SET(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
ENDIF()
SET(CPACK_NSIS_MODIFY_PATH OFF)
SET(CPACK_NSIS_INSTALL_ROOT "C:\\\\Emgu")
IF(NOT NETFX_CORE)
ADD_SUBDIRECTORY(Emgu.CV.DebuggerVisualizers)
ENDIF()
IF(NOT NETFX_CORE)
if(WITH_FFMPEG)
INSTALL(
FILES
"${UNMANAGED_LIBRARY_OUTPUT_PATH}/${OPENCV_FFMPEG_OUTPUT_NAME}.dll"
DESTINATION "libs/${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER}/"
COMPONENT libs
)
endif()
# ----------------------------------------------------------------------------
# Install Debugger Visualizer
# ----------------------------------------------------------------------------
SET (HAS_WINDESKTOP_X86_NATIVE_BINARY OFF)
IF (IS_WINDESKTOP_X86_BUILD)
FOREACH(tmp_component ${OPENCV_LIBRARY_OUTPUT_NAMES})
LIST(APPEND UNMANAGED_DLL_32BIT "${UNMANAGED_LIBRARY_OUTPUT_PATH}/${tmp_component}.dll")
ENDFOREACH()
FOREACH(tmp_component ${CVEXTERN_DEPENDENCY_DLL_NAMES})
LIST(APPEND UNMANAGED_DLL_32BIT "${UNMANAGED_LIBRARY_OUTPUT_PATH}/${tmp_component}.dll")
ENDFOREACH()
SET (HAS_WINDESKTOP_X86_NATIVE_BINARY ON)
IF (${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER} MATCHES "^$")
SET(DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER "")
ELSE()
#MESSAGE(STATUS "UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER: ${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER}")
#remove leading slashes
STRING(REGEX REPLACE "^/" "" DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER ${UNMANAGED_LIBRARY_OUTPUT_SUBFOLDER})
#add tailing slashes
SET(DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER "${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}\\")
#replace single slashes with quard slashes
STRING(REGEX REPLACE "\\\\" "\\\\\\\\" DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER ${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER})
#MESSAGE(STATUS "DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER: ${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}")
ENDIF()
ELSE()
FILE(GLOB UNMANAGED_DLL_32BIT "${CMAKE_CURRENT_SOURCE_DIR}/libs/x86/*.dll")
LIST(LENGTH UNMANAGED_DLL_32BIT UNMANAGED_DLL_32BIT_LENGTH)
IF(UNMANAGED_DLL_32BIT_LENGTH GREATER 0)
SET (HAS_WINDESKTOP_X86_NATIVE_BINARY ON)
SET(DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER "x86\\\\")
ENDIF()
ENDIF()
MESSAGE(STATUS "HAS_WINDESKTOP_X86_NATIVE_BINARY: ${HAS_WINDESKTOP_X86_NATIVE_BINARY}")
#FOREACH (file ${UNMANAGED_DLL_32BIT})
# MESSAGE(STATUS "WILL DEPLOY ${file} with DEBUGGER VISUALIZER")
#ENDFOREACH()
IF (HAS_WINDESKTOP_X86_NATIVE_BINARY)
SET(DEBUGER_VISUALIZER_FILES
"Emgu.CV.World.Netstandard"
"Emgu.CV.UI"
"ZedGraph")
#"Emgu.CV.DebuggerVisualizers")
#SET(DEBUGGER_VISUALIZER_UNMANAGED_FILES
# "Emgu.CV.DebuggerVisualizers"
#${OPENCV_LIBRARY_OUTPUT_NAMES}
#${CVEXTERN_DEPENDENCY_DLL_NAMES})
SET(DEBUGGER_VISUALIZER_UNMANAGED_FILES)
FOREACH(full_file_name ${UNMANAGED_DLL_32BIT})
get_filename_component(just_the_file_name "${full_file_name}" NAME_WE)
LIST(APPEND DEBUGGER_VISUALIZER_UNMANAGED_FILES "${just_the_file_name}")
ENDFOREACH()
#MESSAGE(STATUS "########### UNMANAGED_DLL_32BIT: ${UNMANAGED_DLL_32BIT}")
#MESSAGE(STATUS "########### DEBUGGER_VISUALIZER_UNMANAGED_FILES: ${DEBUGGER_VISUALIZER_UNMANAGED_FILES}")
#MESSAGE(STATUS "########### DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER: ${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}")
#FOREACH(UNMANAGE_DLL_NAME ${CVEXTERN_DEPENDENCY_DLL_NAMES})
# LIST(APPEND DEBUGGER_VISUALIZER_FILES "${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}${UNMANAGE_DLL_NAME}")
#ENDFOREACH()
#MESSAGE(STATUS "DEBUGGER VISUALIZER FILES: ${DEBUGER_VISUALIZER_FILES}")
MACRO(INSTALL_DEBUGER_VISUALIZER vs_version vs_description hklm_key)
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND "installDebuggerVisualizer4${vs_version}:
ClearErrors
Var /GLOBAL ${vs_version}_INSTALL_FOLDER ")
IF("${vs_version}" STREQUAL "VS2017")
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
ReadRegStr \\\$R1 HKLM '${hklm_key}' '15.0'
StrCpy $${vs_version}_INSTALL_FOLDER '\\\$R1Common7\\\\Packages\\\\Debugger\\\\Visualizers\\\\'")
ELSEIF("${vs_version}" STREQUAL "VS2019")
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
ExecDos::exec /NOUNLOAD /TOSTACK '\\\$INSTDIR\\\\miscellaneous\\\\vswhere.exe -version [16.0,17.0) -property installationPath' ''
Pop $0
StrCmp $0 0 0 installDebuggerVisualizer4${vs_version}Done
Pop $1
;MessageBox MB_OK 'vswhere result ($1).'
StrCmp $1 0 installDebuggerVisualizer4${vs_version}Done 0
StrCpy $${vs_version}_INSTALL_FOLDER '\\\$1\\\\Common7\\\\Packages\\\\Debugger\\\\Visualizers\\\\'
")
ELSE()
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
ReadRegStr \\\$R1 HKLM '${hklm_key}' 'InstallDir'
StrCpy $${vs_version}_INSTALL_FOLDER '\\\$R1..\\\\Packages\\\\Debugger\\\\Visualizers\\\\'")
ENDIF()
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
IfErrors installDebuggerVisualizer4${vs_version}Done
MessageBox MB_YESNO 'Install Debugger Visualizer for ${vs_description}?' IDNO installDebuggerVisualizer4${vs_version}Done")
#Install Emgu CV managed DLLs
FOREACH (file ${DEBUGER_VISUALIZER_FILES})
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
CopyFiles /SILENT '\\\$INSTDIR\\\\bin\\\\${file}.dll' '$${vs_version}_INSTALL_FOLDER'")
ENDFOREACH()
#INSTALL native DLLs
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
CreateDirectory '$${vs_version}_INSTALL_FOLDER${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}'")
FOREACH (file ${DEBUGGER_VISUALIZER_UNMANAGED_FILES})
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
CopyFiles /SILENT '\\\$INSTDIR\\\\libs\\\\${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}${file}.dll' '$${vs_version}_INSTALL_FOLDER${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}'")
#MESSAGE(STATUS " --- Adding libs\${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}${file}.dll to debuger visualizer folder '$${vs_version}_INSTALL_FOLDER${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}' for ${vs_description}")
ENDFOREACH()
#IF(DEFINED UNIVERSAL_BUILD)
#SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
# "${INSTALL_DEBUGER_VISUALIZER_COMMAND}
#CreateDirectory '$${vs_version}_INSTALL_FOLDERx86\\\\'")
#FOREACH (file ${UNMANAGED_DLL_32BIT})
# GET_FILENAME_COMPONENT(UNMANAGED_FILE_NAME_TO_DEPLOY ${file} NAME)
# MESSAGE(STATUS "Adding ${UNMANAGED_FILE_NAME_TO_DEPLOY} to debuger visualizer for ${vs_description}")
# SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
# "${INSTALL_DEBUGER_VISUALIZER_COMMAND}
#CopyFiles /SILENT '\\\$INSTDIR\\\\libs\\\\x86\\\\${UNMANAGED_FILE_NAME_TO_DEPLOY}' '$${vs_version}_INSTALL_FOLDERx86\\\\'")
#ENDFOREACH()
#ENDIF()
#Install the Debugger Visualizer itself
SET(INSTALL_DEBUGER_VISUALIZER_COMMAND
"${INSTALL_DEBUGER_VISUALIZER_COMMAND}
CopyFiles /SILENT '\\\$INSTDIR\\\\bin\\\\Emgu.CV.DebuggerVisualizers.dll' '$${vs_version}_INSTALL_FOLDER'
installDebuggerVisualizer4${vs_version}Done:")
ENDMACRO()
MACRO(UNINSTALL_DEBUGER_VISUALIZER vs_version hklm_key)
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND "uninstallDebuggerVisualizer4${vs_version}:
ClearErrors")
IF("${vs_version}" STREQUAL "VS2017")
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
"${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
ReadRegStr \\\$R1 HKLM '${hklm_key}' '15.0'
StrCpy $${vs_version}_INSTALL_FOLDER '\\\$R1Common7\\\\Packages\\\\Debugger\\\\Visualizers\\\\'")
ELSEIF("${vs_version}" STREQUAL "VS2019")
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
"${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
ExecDos::exec /NOUNLOAD /TOSTACK '\\\$INSTDIR\\\\miscellaneous\\\\vswhere.exe -version [16.0,17.0) -property installationPath' '' '$EXEDIR\\\\execdos.log'
Pop $0
StrCmp $0 0 0 uninstallDebuggerVisualizer4${vs_version}Done
Pop $1
StrCmp $1 0 uninstallDebuggerVisualizer4${vs_version}Done 0
StrCpy $${vs_version}_INSTALL_FOLDER '\\\$1\\\\Common7\\\\Packages\\\\Debugger\\\\Visualizers\\\\'
")
ELSE()
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
"${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
ReadRegStr \\\$R1 HKLM '${hklm_key}' 'InstallDir'
StrCpy $${vs_version}_INSTALL_FOLDER '\\\$R1..\\\\Packages\\\\Debugger\\\\Visualizers\\\\'")
ENDIF()
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
"${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
IfErrors uninstallDebuggerVisualizer4${vs_version}Done")
FOREACH (file ${DEBUGER_VISUALIZER_FILES})
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
"${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
Delete '$${vs_version}_INSTALL_FOLDER${file}.dll'")
ENDFOREACH()
FOREACH (file ${DEBUGGER_VISUALIZER_UNMANAGED_FILES})
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
"${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
Delete '$${vs_version}_INSTALL_FOLDER${DEBUGGER_VISUALIZER_UNMANAGED_FILES_SUBFOLDER}${file}.dll'")
ENDFOREACH()
#IF(DEFINED UNIVERSAL_BUILD)
#FOREACH (file ${UNMANAGED_DLL_32BIT})
# GET_FILENAME_COMPONENT(UNMANAGED_FILE_NAME_TO_DEPLOY ${file} NAME)
# SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
# "${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
#Delete '$${vs_version}_INSTALL_FOLDERx86\\\\${UNMANAGED_FILE_NAME_TO_DEPLOY}'")
#ENDFOREACH()
#ENDIF()
SET(UNINSTALL_DEBUGER_VISUALIZER_COMMAND
"${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}
#Delete '$${vs_version}_INSTALL_FOLDEREmgu.CV.DebuggerVisualizers.${vs_version}.dll'
Delete '$${vs_version}_INSTALL_FOLDEREmgu.CV.DebuggerVisualizers.dll'
uninstallDebuggerVisualizer4${vs_version}Done:
")
ENDMACRO()
#INSTALL_DEBUGER_VISUALIZER("VS2008" "Visual Studio 2008" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\9.0")
#SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n${INSTALL_DEBUGER_VISUALIZER_COMMAND}")
#INSTALL_DEBUGER_VISUALIZER("VS2010" "Visual Studio 2010" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\10.0")
#SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n${INSTALL_DEBUGER_VISUALIZER_COMMAND}")
#INSTALL_DEBUGER_VISUALIZER("VS2012" "Visual Studio 2012" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\11.0")
#SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n${INSTALL_DEBUGER_VISUALIZER_COMMAND}")
#INSTALL_DEBUGER_VISUALIZER("VS2013" "Visual Studio 2013" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\12.0")
#SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n${INSTALL_DEBUGER_VISUALIZER_COMMAND}")
#INSTALL_DEBUGER_VISUALIZER("VS2015" "Visual Studio 2015" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\14.0")
#SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n${INSTALL_DEBUGER_VISUALIZER_COMMAND}")
INSTALL_DEBUGER_VISUALIZER("VS2017" "Visual Studio 2017" "SOFTWARE\\\\\\\\WOW6432NODE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\SxS\\\\\\\\VS7")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n${INSTALL_DEBUGER_VISUALIZER_COMMAND}")
INSTALL_DEBUGER_VISUALIZER("VS2019" "Visual Studio 2019" "")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n${INSTALL_DEBUGER_VISUALIZER_COMMAND}")
#UNINSTALL_DEBUGER_VISUALIZER("VS2008" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\9.0")
#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}")
#UNINSTALL_DEBUGER_VISUALIZER("VS2010" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\10.0")
#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}")
#UNINSTALL_DEBUGER_VISUALIZER("VS2012" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\11.0")
#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}")
#UNINSTALL_DEBUGER_VISUALIZER("VS2013" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\12.0")
#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}")
#UNINSTALL_DEBUGER_VISUALIZER("VS2015" "SOFTWARE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\14.0")
#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}")
UNINSTALL_DEBUGER_VISUALIZER("VS2017" "SOFTWARE\\\\\\\\WOW6432NODE\\\\\\\\Microsoft\\\\\\\\VisualStudio\\\\\\\\SxS\\\\\\\\VS7")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}")
UNINSTALL_DEBUGER_VISUALIZER("VS2019" "")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n${UNINSTALL_DEBUGER_VISUALIZER_COMMAND}")
ELSE()
MESSAGE(STATUS "x86 binary not found, will not deploy debugger visualizer")
ENDIF()
ENDIF()
# ----------------------------------------------------------------------------
# Build the documents of Emgu CV
# ----------------------------------------------------------------------------
SET(EMGU_CV_DOCUMENTATION_BUILD OFF CACHE BOOL "Build Emgu CV Documentation")
IF(EMGU_CV_DOCUMENTATION_BUILD)
ADD_SUBDIRECTORY(miscellaneous)
ENDIF()
# ----------------------------------------------------------------------------
# Set if we should sign the managed assembly
# ----------------------------------------------------------------------------
IF (WIN32)
SET(EMGU_SIGN_ASSEMBLY OFF CACHE BOOL "If enabled, we will sign the managed assembly")
ELSE()
SET(EMGU_SIGN_ASSEMBLY ON CACHE BOOL "If enabled, we will sign the managed assembly")
ENDIF()
# ----------------------------------------------------------------------------
# Build the extra components of Emgu CV
# ----------------------------------------------------------------------------
SET(EMGU_CV_EXTRA_BUILD OFF CACHE BOOL "Build Emgu CV Extra")
IF(EMGU_CV_EXTRA_BUILD)
ADD_SUBDIRECTORY(Emgu.RPC)
ENDIF()
# ----------------------------------------------------------------------------
# The source files
# ----------------------------------------------------------------------------
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/lib
DESTINATION .
COMPONENT emgucv_source
FILES_MATCHING
PATTERN "*.dll"
PATTERN "*.txt"
PATTERN "*.xml"
PATTERN ".git" EXCLUDE
PATTERN "obj" EXCLUDE
PATTERN "CMake*" EXCLUDE
PATTERN "Release" EXCLUDE
PATTERN "${PROJECT_NAME}.dir" EXCLUDE
)
#WINDOWS STORE EXAMPLE
IF(HAVE_WINSTORE_10_X86 OR HAVE_WINSTORE_10_X64 OR HAVE_WINSTORE_10_ARM)
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/Solution
DESTINATION .
COMPONENT emgucv_example_source
FILES_MATCHING
PATTERN "Emgu.CV.Example.Windows.UWP.sln"
PATTERN "Windows.UWP/packages/repositories.config"
PATTERN ".git" EXCLUDE
PATTERN "bin" EXCLUDE
PATTERN "Android" EXCLUDE
PATTERN "iOS" EXCLUDE
PATTERN "Windows.Phone" EXCLUDE
PATTERN "Windows.Desktop" EXCLUDE
PATTERN "CrossPlatform" EXCLUDE
PATTERN "Mac" EXCLUDE
)
ENDIF()
#WIN32 and not NETFX_CORE solution files
IF (HAVE_WINDESKTOP_X86 OR HAVE_WINDESKTOP_X64)
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/Solution
DESTINATION .
COMPONENT emgucv_source
FILES_MATCHING
PATTERN "Emgu.CV.sln"
PATTERN "Emgu.CV.DebuggerVisualizers.sln"
PATTERN ".git" EXCLUDE
PATTERN "bin" EXCLUDE
PATTERN "Android" EXCLUDE
PATTERN "iOS" EXCLUDE
PATTERN "CrossPlatform" EXCLUDE
PATTERN "Mac" EXCLUDE
PATTERN "Windows.UWP" EXCLUDE
)
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.WPF
DESTINATION .
COMPONENT emgucv_example_source
FILES_MATCHING
PATTERN "*.cs"
PATTERN ".git" EXCLUDE
)
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/Solution
DESTINATION .
COMPONENT emgucv_example_source
FILES_MATCHING
PATTERN "Emgu.CV.Example.sln"
PATTERN ".git" EXCLUDE
PATTERN "bin" EXCLUDE
PATTERN "Android" EXCLUDE
PATTERN "iOS" EXCLUDE
PATTERN "Windows.UWP" EXCLUDE
PATTERN "CrossPlatform" EXCLUDE
PATTERN "Mac" EXCLUDE
)
# ----------------------------------------------------------------------------
# The example files
# ----------------------------------------------------------------------------
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.Example
DESTINATION .
COMPONENT emgucv_example_source
FILES_MATCHING
PATTERN "*.cs"
PATTERN "*.csproj"
PATTERN "*.resx"
PATTERN "*.h"
PATTERN "*.cpp"
PATTERN "*.resX"
PATTERN "*.ico"
PATTERN "*.rc"
PATTERN "CPlusPlus/*.vcproj"
PATTERN "CPlusPlus/*.vcxproj"
PATTERN "*.vb"
PATTERN "*.vbproj"
PATTERN "*.aspx"
PATTERN "*.dll"
PATTERN "*.txt"
PATTERN "*.xml"
PATTERN "*.xaml"
PATTERN "*.jpg"
PATTERN "*.png"
PATTERN "*.settings"
PATTERN "*.config"
PATTERN "tessdata/*"
PATTERN ".git" EXCLUDE
PATTERN "obj" EXCLUDE
PATTERN "CMake*" EXCLUDE
PATTERN "Release" EXCLUDE
PATTERN "Debug" EXCLUDE
PATTERN "RelWithDebInfo" EXCLUDE
PATTERN "*.dir" EXCLUDE
PATTERN "Android" EXCLUDE
PATTERN "iOS" EXCLUDE
PATTERN "Mac" EXCLUDE
PATTERN "WindowsStore" EXCLUDE
PATTERN "WindowsPhoneApp" EXCLUDE
PATTERN "WindowsStoreCameraApp" EXCLUDE
)
ENDIF()
INSTALL(
FILES
"${OPENCV_SUBFOLDER}/data/haarcascades/haarcascade_frontalface_default.xml"
"${OPENCV_SUBFOLDER}/data/haarcascades/haarcascade_eye.xml"
DESTINATION opencv/data/haarcascades
COMPONENT emgucv_example_source
)
INSTALL(
FILES
"${OPENCV_CONTRIB_SUBFOLDER}/modules/text/samples/trained_classifierNM1.xml"
"${OPENCV_CONTRIB_SUBFOLDER}/modules/text/samples/trained_classifierNM2.xml"
"${OPENCV_CONTRIB_SUBFOLDER}/modules/text/samples/trained_classifier_erGrouping.xml"
DESTINATION opencv_contrib/modules/text/samples/
COMPONENT emgucv_example_source
)
# ----------------------------------------------------------------------------
# Build the package
# ----------------------------------------------------------------------------
set(CPACK_COMPONENTS_ALL
libs #opencv components
emgucv_binary
emgucv_source
emgucv_example_source
)
set(CPACK_PACKAGE_EXECUTABLES "" "") #http://public.kitware.com/Bug/view.php?id=7828
SET(CPACK_NSIS_CONTACT "support@emgu.com")
# Define MUI_TEMP that will be used for uninstalling menulinks
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP")
# ----------------------------------------------------------------------------
# Add menu link for documentations
# ----------------------------------------------------------------------------
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateDirectory \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation\\\" ")
#SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation\\\\Open CV Documentation.lnk\\\" \\\"$INSTDIR\\\\doc\\\\opencv2refman.pdf\\\" ")
#SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation\\\\Open CV Documentation.lnk\\\" ")
IF(EMGU_CV_DOCUMENTATION_BUILD)
LIST(APPEND CPACK_COMPONENTS_ALL emgucv_document)
set(CPACK_COMPONENT_EMGUCV_DOCUMENT_DISPLAY_NAME "Emgu CV Documentation")
set(CPACK_COMPONENT_EMGUCV_DOCUMENT_DEPENDS emgucv_binary)
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation\\\\Emgu CV Documentation.lnk\\\" \\\"$INSTDIR\\\\Emgu.CV.Documentation.chm\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation\\\\Emgu CV Documentation.lnk\\\" ")
ENDIF()
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\nRMDir \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation\\\" ")
# ----------------------------------------------------------------------------
# Add menu link for web sites
# ----------------------------------------------------------------------------
LIST(APPEND CPACK_NSIS_MENU_LINKS "http://www.emgu.com" "Emgu CV wiki")
LIST(APPEND CPACK_NSIS_MENU_LINKS "http://www.emgu.com/forum" "Emgu CV Discussion Forums")
LIST(APPEND CPACK_NSIS_MENU_LINKS "https://github.com/emgucv/emgucv/issues" "Emgu CV Bug Tracking")
# ----------------------------------------------------------------------------
# Add menu link for Visual Studio solutions
# ----------------------------------------------------------------------------
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateDirectory \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Visual Studio Solution\\\" ")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Visual Studio Solution\\\\Visual Studio 2013 - 2019 Examples.lnk\\\" \\\"$INSTDIR\\\\Solution\\\\Windows.Desktop\\\\Emgu.CV.Example.sln\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Visual Studio Solution\\\\Visual Studio 2013 - 2019 Examples.lnk\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\nRMDir \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Visual Studio Solution\\\" ")
# ----------------------------------------------------------------------------
# Add menu link for Licenses
# ----------------------------------------------------------------------------
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateDirectory \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\License\\\" ")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\License\\\\Emgu CV License.lnk\\\" \\\"$INSTDIR\\\\${LICENSE_FILE_NAME}\\\" ")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\License\\\\Open CV License.lnk\\\" \\\"$INSTDIR\\\\lib\\\\opencv.license.txt\\\" ")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\License\\\\ZedGraph License.lnk\\\" \\\"$INSTDIR\\\\lib\\\\3rdParty\\\\ZedGraph.license.txt\\\" ")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\License\\\\Tesseract OCR License.lnk\\\" \\\"$INSTDIR\\\\lib\\\\3rdParty\\\\tesseract-ocr.license.txt\\\" ")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\nCreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\License\\\\CvBlob License.lnk\\\" \\\"$INSTDIR\\\\lib\\\\3rdParty\\\\cvblob.license.txt\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\License\\\\Emgu CV License.lnk\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\License\\\\Open CV License.lnk\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\License\\\\ZedGraph License.lnk\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\License\\\\Tesseract OCR License.lnk\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\n Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\License\\\\CvBlob License.lnk\\\" ")
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}\nRMDir \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\License\\\" ")
#IF(EMGU_CV_EXAMPLE_BUILD AND NOT NETFX_CORE)
# LIST(APPEND CPACK_COMPONENTS_ALL emgucv_example_binary)
# SET(CPACK_COMPONENT_EMGUCV_EXAMPLE_BINARY_DISPLAY_NAME "Emgu CV Examples (Binary)")
# SET(CPACK_COMPONENT_EMGUCV_EXAMPLE_BINARY_DEPENDS emgucv_binary)
#ENDIF()
set(CPACK_COMPONENT_MAIN_DISPLAY_NAME "OpenCV Native Binary")
set(CPACK_COMPONENT_MAIN_REQUIRED ON)
set(CPACK_COMPONENT_EMGUCV_BINARY_DISPLAY_NAME "Emgu CV (Binary)")
set(CPACK_COMPONENT_EMGUCV_BINARY_REQUIRED ON)
set(CPACK_COMPONENT_EMGUCV_BINARY_DEPENDS libs)
set(CPACK_COMPONENT_EMGUCV_SOURCE_DISPLAY_NAME "Emgu CV (Source)")
set(CPACK_COMPONENT_EMGUCV_SOURCE_DEPENDS libs)
set(CPACK_COMPONENT_EMGUCV_EXAMPLE_SOURCE_DISPLAY_NAME "Emgu CV Examples (Source)")
set(CPACK_COMPONENT_EMGUCV_EXAMPLE_SOURCE_DEPENDS emgucv_source)
ELSEIF (APPLE)
SET(CPACK_GENERATOR ZIP)
SET(CPACK_BUNDLE_NAME ${CPACK_PACKAGE_NAME})
SET(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/platforms/osx/icons.icns")
IF (IOS)
SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON) #enable components install for zip
IF(CPACK_GENERATOR MATCHES "ZIP")
SET(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
ENDIF()
set(CPACK_COMPONENTS_ALL emgucv_binary emgucv_source emgucv_example_source)
ENDIF()
# ----------------------------------------------------------------------------
# The source files
# ----------------------------------------------------------------------------
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/lib
DESTINATION .
COMPONENT emgucv_source
FILES_MATCHING
PATTERN "*.dll"
PATTERN "*.txt"
PATTERN "*.xml"
PATTERN ".git" EXCLUDE
PATTERN "obj" EXCLUDE
PATTERN "CMake*" EXCLUDE
PATTERN "Release" EXCLUDE
PATTERN "${PROJECT_NAME}.dir" EXCLUDE
)
# ----------------------------------------------------------------------------
# The example files
# ----------------------------------------------------------------------------
INSTALL(
DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/Emgu.CV.Example
DESTINATION .
COMPONENT emgucv_example_source
FILES_MATCHING
PATTERN "*.cs"
PATTERN "*.csproj"
PATTERN "*.resx"
PATTERN "*.h"
PATTERN "*.cpp"
PATTERN "*.resX"
PATTERN "*.ico"
PATTERN "*.rc"
PATTERN "CPlusPlus/*.vcproj"
PATTERN "CPlusPlus/*.vcxproj"
PATTERN "*.vb"
PATTERN "*.vbproj"
PATTERN "*.aspx"
PATTERN "*.dll"
PATTERN "*.txt"
PATTERN "*.xml"
PATTERN "*.xaml"
PATTERN "*.jpg"
PATTERN "*.png"
PATTERN "*.settings"
PATTERN "*.config"
PATTERN "tessdata/*"
PATTERN ".git" EXCLUDE
PATTERN "obj" EXCLUDE
PATTERN "CMake*" EXCLUDE
PATTERN "Release" EXCLUDE
PATTERN "Debug" EXCLUDE
PATTERN "*.dir" EXCLUDE
PATTERN "Android" EXCLUDE
PATTERN "iOS" EXCLUDE
)
INSTALL(
FILES
"${OPENCV_SUBFOLDER}/data/haarcascades/haarcascade_frontalface_default.xml"
"${OPENCV_SUBFOLDER}/data/haarcascades/haarcascade_eye.xml"
DESTINATION opencv/data/haarcascades
COMPONENT emgucv_example_source
)
INSTALL(
FILES
"${OPENCV_CONTRIB_SUBFOLDER}/modules/text/samples/trained_classifierNM1.xml"
"${OPENCV_CONTRIB_SUBFOLDER}/modules/text/samples/trained_classifierNM2.xml"
"${OPENCV_CONTRIB_SUBFOLDER}/modules/text/samples/trained_classifier_erGrouping.xml"
DESTINATION opencv_contrib/modules/text/samples/
COMPONENT emgucv_example_source
)
# ----------------------------------------------------------------------------
# Generate required common assembly file for Emgu CV project
# ----------------------------------------------------------------------------
SET(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/CMake/osx/Info.plist)
FILE(WRITE ${CPACK_BUNDLE_PLIST}
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>CFBundleIdentifier</key>
<string>com.emgu.emgucv</string>
<key>CFBundleName</key>
<string>${CPACK_BUNDLE_NAME}</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.6</string>
</dict>
</plist>")
ELSE() #LINUX
SET(MONO_GACUTIL_EXEC "gacutil")
SET(LINUX_CONTROL_FILE_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux")
SET(EMGUCV_MANAGED_DLLS "Emgu.CV.World" "Emgu.CV.UI" "ZedGraph")
SET(CLIFILELIST_CONTENT "")
FOREACH(MANAGED_DLL ${EMGUCV_MANAGED_DLLS})
SET(CLIFILELIST_CONTENT "${CLIFILELIST_CONTENT}/usr/${CPACK_PACKAGE_CLI_FOLDER}/${MANAGED_DLL}.dll\n")
ENDFOREACH()
FILE(WRITE ${LINUX_CONTROL_FILE_FOLDER}/clifilelist.txt ${CLIFILELIST_CONTENT})
INSTALL(
FILES
${LINUX_CONTROL_FILE_FOLDER}/clifilelist.txt
DESTINATION ${CPACK_PACKAGE_CLI_FOLDER}
COMPONENT emgucv_binary)
#creating the pkg-config file
SET(PACKAGE_CFG_REF_CONTENT "")
FOREACH(MANAGED_DLL ${EMGUCV_MANAGED_DLLS})
SET(PACKAGE_CFG_REF_CONTENT "${PACKAGE_CFG_REF_CONTENT} -r:\${libdir}/${MANAGED_DLL}.dll")
ENDFOREACH()
FILE(WRITE ${LINUX_CONTROL_FILE_FOLDER}/${CPACK_PACKAGE_NAME}.pc
"prefix=/usr\nexec_prefix=\${prefix}\nlibdir=\${exec_prefix}/${CPACK_PACKAGE_CLI_FOLDER}\napidir=\${exec_prefix}/${CPACK_PACKAGE_CLI_FOLDER}\n\nName: ${CPACK_PACKAGE_NAME}\nDescription: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\nVersion: ${CPACK_PACKAGE_VERSION}\nLibs: ${PACKAGE_CFG_REF_CONTENT}\n")
INSTALL(
FILES
${LINUX_CONTROL_FILE_FOLDER}/${CPACK_PACKAGE_NAME}.pc
DESTINATION /usr/lib/pkgconfig
COMPONENT emgucv_binary)
SET(REMOVE_EMGU_FROM_GAC_SCRIPT "")
FOREACH(MANAGED_DLL ${EMGUCV_MANAGED_DLLS})
SET(REMOVE_EMGU_FROM_GAC_SCRIPT "${REMOVE_EMGU_FROM_GAC_SCRIPT} ${MANAGED_DLL}")
ENDFOREACH()
SET(REMOVE_EMGU_FROM_GAC_SCRIPT "for dll in${REMOVE_EMGU_FROM_GAC_SCRIPT}; do ${MONO_GACUTIL_EXEC} -u $dll; done")
SET(CPACK_STRIP_FILES "")
IF(NOT CPACK_GENERATOR)
MESSAGE(STATUS "Checking for CPACK build type...")
FIND_PROGRAM(DPKG_CMD dpkg)
IF (DPKG_CMD)
# ----------------------------------------------------------------------------
# Building .deb package for Debian
# ----------------------------------------------------------------------------
MESSAGE(STATUS "FOUND dpkg: ${DPKG_CMD}")
LIST(APPEND CPACK_GENERATOR DEB)
ENDIF()
FIND_PROGRAM(RPMBUILD_CMD rpmbuild)
IF(RPMBUILD_CMD)
# ----------------------------------------------------------------------------
# Building .rpm package
# ----------------------------------------------------------------------------
MESSAGE(STATUS "FOUND rpmbuild: ${RPMBUILD_CMD}")
LIST(APPEND CPACK_GENERATOR RPM)
ENDIF()
ENDIF()
SET(PREINST_SCRIPT "#!/bin/sh\nmkdir -p /usr/lib/pkgconfig /usr/${CPACK_PACKAGE_CLI_FOLDER} /usr/share/opencv/haarcascades /usr/share/opencv/lbpcascades /usr/share/opencv/doc \n")
LIST(FIND CPACK_GENERATOR "DEB" TEMP)
IF(NOT (${TEMP} EQUAL -1))
SET(DEBIAN_CONTROL_FILE_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian")
FILE(WRITE ${DEBIAN_CONTROL_FILE_FOLDER}/preinst ${PREINST_SCRIPT})
FILE(WRITE ${DEBIAN_CONTROL_FILE_FOLDER}/postinst
"#!/bin/sh\nset -e\nif [ \"$1\" = \"configure\" ]; then\n ldconfig\n ${MONO_GACUTIL_EXEC} -il /usr/${CPACK_PACKAGE_CLI_FOLDER}/clifilelist.txt -package ${CPACK_PACKAGE_NAME}\nfi\n")
FILE(WRITE ${DEBIAN_CONTROL_FILE_FOLDER}/prerm
"#!/bin/sh\nset -e\nif [ \"$1\" = \"remove\" ] || [ \"$1\" = \"upgrade\" ] && [ -x /usr/share/cli-common/gac-package-remove ]; then\n${REMOVE_EMGU_FROM_GAC_SCRIPT}\nfi\n")
SET(DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${DEBIAN_CONTROL_FILE_FOLDER}/preinst;${DEBIAN_CONTROL_FILE_FOLDER}/postinst;${DEBIAN_CONTROL_FILE_FOLDER}/prerm;${DEBIAN_CONTROL_FILE_FOLDER}/postrm")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "mono-runtime (>> 2.4.2), mono-2.0-gac, libtiff5, libgeotiff2, libgtk-3-0, libgstreamer1.0-0, libavcodec54, libswscale2, libavformat54, libopenexr6, libjasper1, libdc1394-22, libv4l-0, libqt4-opengl")
IF(EMGU_CV_WITH_TESSERACT)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libtesseract3")
ENDIF()
IF(WITH_TBB)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libtbb2")
ENDIF()
ENDIF()
LIST(FIND CPACK_GENERATOR "RPM" TEMP)
IF(NOT (${TEMP} EQUAL -1))
SET(CPACK_RPM_PACKAGE_LICENSE "GPL v3")
SET(CPACK_RPM_PACKAGE_REQUIRES "mono-core >= 2.6, mono-wcf, jasper, libgeotiff, gtk2, OpenEXR, libv4l, libdc1394, qt")
IF (WITH_TBB)
SET(CPACK_RPM_PACKAGE_REQUIRES ", tbb")
ENDIF()
IF(EMGUCV_WITH_TESSERACT AND TESSERACT_FOUND)
SET(CPACK_RPM_PACKAGE_REQUIRES ", tesseract")
ENDIF()
SET(RPM_CONTROL_FILE_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/cmake/rpm")
FILE(WRITE ${RPM_CONTROL_FILE_FOLDER}/preinst ${PREINST_SCRIPT})
FILE(WRITE ${RPM_CONTROL_FILE_FOLDER}/postinst
"ldconfig\n${MONO_GACUTIL_EXEC} -il /usr/${CPACK_PACKAGE_CLI_FOLDER}/clifilelist.txt -package ${CPACK_PACKAGE_NAME}\n")
FILE(WRITE ${RPM_CONTROL_FILE_FOLDER}/prerm
"${REMOVE_EMGU_FROM_GAC_SCRIPT}\n")
SET(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${RPM_CONTROL_FILE_FOLDER}/preinst")
SET(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${RPM_CONTROL_FILE_FOLDER}/postinst")
SET(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE "${RPM_CONTROL_FILE_FOLDER}/prerm")
SET(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${RPM_CONTROL_FILE_FOLDER}/postrm")
ENDIF()
ENDIF()
MESSAGE(STATUS "CPACK_GENERATOR: ${CPACK_GENERATOR}")
INCLUDE (CPack)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/BuLuoPiaoYu/emgucv.git
git@gitee.com:BuLuoPiaoYu/emgucv.git
BuLuoPiaoYu
emgucv
emgucv
master

搜索帮助