aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2018-01-05 13:42:37 +0200
committerGitHub <noreply@github.com>2018-01-05 13:42:37 +0200
commitcdce53330e9a0b16678271d8f00898c491e8ce43 (patch)
tree8b5fd98a89ade472a2017b3dda5b80916cbc74df
parent94a9087b8fc3dddfc62e49fb335287fdcf166e59 (diff)
parente3ae00e4f156aae36ec91be5da9fb3244ce3c1f8 (diff)
downloadvcpkg-cdce53330e9a0b16678271d8f00898c491e8ce43.tar.gz
vcpkg-cdce53330e9a0b16678271d8f00898c491e8ce43.zip
Merge pull request #2503 from procxx/add_cimg
[cimg] initial port
-rw-r--r--ports/cimg/CMakeLists.txt21
-rw-r--r--ports/cimg/CONTROL3
-rw-r--r--ports/cimg/portfile.cmake23
3 files changed, 47 insertions, 0 deletions
diff --git a/ports/cimg/CMakeLists.txt b/ports/cimg/CMakeLists.txt
new file mode 100644
index 000000000..75ae59cd5
--- /dev/null
+++ b/ports/cimg/CMakeLists.txt
@@ -0,0 +1,21 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 3.9)
+project(CImg)
+
+add_library(${PROJECT_NAME} INTERFACE)
+
+target_include_directories(${PROJECT_NAME} INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+install(TARGETS ${PROJECT_NAME}
+ EXPORT CImgExport
+ INCLUDES DESTINATION include
+)
+
+install(EXPORT CImgExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION share/cimg)
+
+install(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/CImg.h
+ DESTINATION include
+)
diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL
new file mode 100644
index 000000000..74f184270
--- /dev/null
+++ b/ports/cimg/CONTROL
@@ -0,0 +1,3 @@
+Source: cimg
+Version: 2.1.8
+Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing
diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake
new file mode 100644
index 000000000..6e5a86ad9
--- /dev/null
+++ b/ports/cimg/portfile.cmake
@@ -0,0 +1,23 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
+ REPO "dtschump/CImg"
+ REF "v.218"
+ HEAD_REF master
+ SHA512 aa6267c9b425cb82aa3aeadea9f7c1ffdd975d01b4f64b8cd905ce11cf062ae22eea9b519c681f0fef239615a621dd3cae2a67e04e6cac96425776a4ac176a23)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+# Move cmake files, ensuring they will be 3 directories up the import prefix
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cimg)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+
+file(INSTALL ${SOURCE_PATH}/Licence_CeCILL-C_V1-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright)
+file(INSTALL ${SOURCE_PATH}/Licence_CeCILL_V2-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright2)