Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Fixed LIBRARY_TYPE in CMakeLists.txt #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ if ( PNG_DEBUG )
endif ( )
include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR} )

add_library ( ${PNG_LIB_NAME} ${libpng_sources} )
if(PNG_SHARED)
set(LIBRARY_TYPE SHARED)
else()
set(LIBRARY_TYPE STATIC)
endif()

add_library ( ${PNG_LIB_NAME} ${LIBRARY_TYPE} ${libpng_sources} )
target_link_libraries ( ${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY} )

if ( PNG_SHARED AND WIN32 )
Expand Down