2017-09-03 22:32:34 +08:00
|
|
|
cmake_minimum_required(VERSION 3.8.0)
|
|
|
|
project(lodepng)
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories(".")
|
|
|
|
|
|
|
|
add_library(lodepng lodepng.cpp lodepng_util.cpp)
|
|
|
|
|
2018-08-10 10:40:09 +08:00
|
|
|
# add_executable(pngdetail pngdetail.cpp)
|
2017-09-03 22:32:34 +08:00
|
|
|
|
2018-08-10 10:40:09 +08:00
|
|
|
# target_link_libraries(pngdetail lodepng)
|
2017-09-03 22:32:34 +08:00
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS lodepng
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
)
|
|
|
|
|
2018-08-10 10:40:09 +08:00
|
|
|
# if(NOT DISABLE_INSTALL_TOOLS)
|
|
|
|
# install (
|
|
|
|
# TARGETS pngdetail
|
|
|
|
# RUNTIME DESTINATION tools/lodepng
|
|
|
|
# )
|
|
|
|
# endif()
|
2017-09-03 22:32:34 +08:00
|
|
|
|
|
|
|
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()
|