mirror of
https://github.com/love2d/megasource.git
synced 2026-08-17 19:24:09 +02:00
Reapply megasource's changes to zlib's cmakelists.txt
This commit is contained in:
@@ -187,6 +187,10 @@ add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC
|
|||||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||||
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
|
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
|
||||||
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
||||||
|
target_include_directories(zlib PUBLIC .)
|
||||||
|
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
target_include_directories(zlibstatic PUBLIC .)
|
||||||
|
target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
if(NOT CYGWIN)
|
if(NOT CYGWIN)
|
||||||
# This property causes shared libraries on Linux to have the full version
|
# This property causes shared libraries on Linux to have the full version
|
||||||
@@ -230,6 +234,8 @@ endif()
|
|||||||
# Example binaries
|
# Example binaries
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
||||||
|
return()
|
||||||
|
|
||||||
add_executable(example test/example.c)
|
add_executable(example test/example.c)
|
||||||
target_link_libraries(example zlib)
|
target_link_libraries(example zlib)
|
||||||
add_test(example example)
|
add_test(example example)
|
||||||
|
|||||||
Reference in New Issue
Block a user