Commit 36e59555 authored by Wieland Morgenstern's avatar Wieland Morgenstern

use conan.cmake, install libpng through conan

parent 94e22b0d
...@@ -110,6 +110,19 @@ if(WIN32) ...@@ -110,6 +110,19 @@ if(WIN32)
set(WINDOWS True) set(WINDOWS True)
set(PLATFORM_SHORTHAND win) set(PLATFORM_SHORTHAND win)
message(STATUS "System: WINDOWS") message(STATUS "System: WINDOWS")
if (WIN_CHOCO)
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.14/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
conan_add_remote(NAME bincrafters URL https://api.bintray.com/conan/bincrafters/public-conan)
conan_cmake_run(REQUIRES libpng/1.6.37@bincrafters/stable)
endif()
endif()
endif(WIN32) endif(WIN32)
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
......
...@@ -6,6 +6,10 @@ elseif(LINUX) ...@@ -6,6 +6,10 @@ elseif(LINUX)
elseif(ANDROID) elseif(ANDROID)
find_library(PNG_LIBRARY png PATHS ${CMAKE_EXTERNAL_LIB} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) find_library(PNG_LIBRARY png PATHS ${CMAKE_EXTERNAL_LIB} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
elseif(WINDOWS) elseif(WINDOWS)
find_debug_and_optimized_library(PNG_LIBRARY "libpng/debug" "libpng" "libpng/release" "libpng") if (WIN_CHOCO)
set(PNG_LIBRARY CONAN_PKG::libpng)
else()
find_debug_and_optimized_library(PNG_LIBRARY "libpng/debug" "libpng" "libpng/release" "libpng")
endif()
endif() endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment