mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 20:13:10 +08:00
[lodepng] init port
This commit is contained in:
parent
f86c8a73d7
commit
0d309cd259
41
ports/lodepng/CMakeLists.txt
Normal file
41
ports/lodepng/CMakeLists.txt
Normal file
@ -0,0 +1,41 @@
|
||||
cmake_minimum_required(VERSION 3.8.0)
|
||||
project(lodepng)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif()
|
||||
|
||||
|
||||
include_directories(".")
|
||||
|
||||
add_library(lodepng lodepng.cpp lodepng_util.cpp)
|
||||
|
||||
add_executable(pngdetail pngdetail.cpp)
|
||||
|
||||
target_link_libraries(pngdetail lodepng)
|
||||
|
||||
install(
|
||||
TARGETS lodepng
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_TOOLS)
|
||||
install (
|
||||
TARGETS pngdetail
|
||||
RUNTIME DESTINATION tools/lodepng
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT DDISABLE_INSTALL_EXAMPLES)
|
||||
install(DIRECTORY examples DESTINATION share/lodepng/)
|
||||
endif()
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
install(FILES lodepng.h lodepng_util.h DESTINATION include)
|
||||
endif()
|
3
ports/lodepng/CONTROL
Normal file
3
ports/lodepng/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: lodepng
|
||||
Version: 2017-09-01-8a0f16afe74a6a
|
||||
Description: PNG encoder and decoder in C and C++
|
28
ports/lodepng/portfile.cmake
Normal file
28
ports/lodepng/portfile.cmake
Normal file
@ -0,0 +1,28 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO lvandeve/lodepng
|
||||
REF 8a0f16afe74a6abf85e3b45e9558283022021a59
|
||||
SHA512 189dde0a0982822b6dfc3f886d8035338ed200958eed8394c5c64aa97ddcf758b3989beae14ce8f26a78efa9fb4b94932bb02b41cacd62bd62a46ebf9b324def
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
-DDISABLE_INSTALL_TOOLS=ON
|
||||
-DDDISABLE_INSTALL_EXAMPLES=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lodepng)
|
||||
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/lodepng RENAME copyright)
|
Loading…
Reference in New Issue
Block a user