-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CImgPlugin] Add fetchable CImg and remove embedded cimg (#4357)
* support interface-type for auto_target_properties install macro * try updating install macro * try updating install macro again * use (only) find_package for CImg * fix image compilation for newer version of cimg * remove cimg src * export mutex symbol with a .def file for windows * add comment * add fetchable cimg * fix packaging * fix image_gui * fix image_type comparison --------- Co-authored-by: erik pernod <[email protected]>
- Loading branch information
Showing
87 changed files
with
128 additions
and
206,463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#[=======================================================================[.rst: | ||
FindCImg | ||
------- | ||
Finds the CImg library. | ||
Imported Targets | ||
^^^^^^^^^^^^^^^^ | ||
This module provides the following imported targets, if found: | ||
``CImg`` | ||
The CImg library | ||
Result Variables | ||
^^^^^^^^^^^^^^^^ | ||
This will define the following variables: | ||
``CImg_FOUND`` | ||
True if the system has the CImg library. | ||
``CImg_VERSION`` | ||
The version of the CImg library which was found. | ||
``CImg_INCLUDE_DIRS`` | ||
Include directories needed to use CImg. | ||
Cache Variables | ||
^^^^^^^^^^^^^^^ | ||
The following cache variables may also be set: | ||
``CImg_INCLUDE_DIR`` | ||
The directory containing ``CImg.h``. | ||
#]=======================================================================] | ||
|
||
cmake_minimum_required(VERSION 3.9) | ||
|
||
find_path(CIMG_H_DIR | ||
NAMES CImg.h | ||
HINTS ${CMAKE_INSTALL_PREFIX} ${CIMG_DIR} | ||
PATH_SUFFIXES include include/linux | ||
) | ||
|
||
if(NOT CIMG_H_DIR) | ||
set(CImg_FOUND FALSE) | ||
else() | ||
set(CImg_FOUND TRUE) | ||
|
||
set(CImg_INCLUDE_DIR ${CIMG_H_DIR} CACHE STRING "") | ||
set(CImg_INCLUDE_DIRS ${CImg_INCLUDE_DIR}) | ||
|
||
file(READ "${CIMG_H_DIR}/CImg.h" header) | ||
string(REGEX MATCH "#define cimg_version ([0-9a-zA-Z\.]+)" _ "${header}") | ||
set(CImg_VERSION "${CMAKE_MATCH_1}") | ||
|
||
if(NOT TARGET CImg) | ||
add_library(CImg INTERFACE) | ||
endif() | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(CImg | ||
FOUND_VAR CImg_FOUND | ||
REQUIRED_VARS | ||
CImg_INCLUDE_DIRS | ||
VERSION_VAR CImg_VERSION | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LIBRARY CIMGPLUGIN | ||
EXPORTS | ||
Mutex_attr @1 |
Oops, something went wrong.