Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeLists.txt: fix static library names #116

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
15 changes: 10 additions & 5 deletions zzip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,21 @@ target_link_libraries(libzzipmmapped ZLIB::ZLIB )
target_include_directories (libzzipmmapped PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
endif()

set_target_properties(libzzip PROPERTIES OUTPUT_NAME "zzip" RELEASE_POSTFIX "-${RELNUM}")
set_target_properties(libzzip PROPERTIES OUTPUT_NAME "zzip")
if(BUILD_SHARED_LIBS)
set_target_properties(libzzip PROPERTIES RELEASE_POSTFIX "-${RELNUM}")
SET_TARGET_PROPERTIES(libzzip PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
endif()

if(ZZIPFSEEKO)
set_target_properties(libzzipfseeko PROPERTIES OUTPUT_NAME "zzipfseeko" RELEASE_POSTFIX "-${RELNUM}")
set_target_properties(libzzipfseeko PROPERTIES OUTPUT_NAME "zzipfseeko")
if(ZZIPFSEEKO AND BUILD_SHARED_LIBS)
set_target_properties(libzzipfseeko PROPERTIES RELEASE_POSTFIX "-${RELNUM}")
SET_TARGET_PROPERTIES(libzzipfseeko PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
endif()

if(ZZIPMMAPPED)
set_target_properties(libzzipmmapped PROPERTIES OUTPUT_NAME "zzipmmapped" RELEASE_POSTFIX "-${RELNUM}")
set_target_properties(libzzipmmapped PROPERTIES OUTPUT_NAME "zzipmmapped")
if(ZZIPMMAPPED AND BUILD_SHARED_LIBS)
set_target_properties(libzzipmmapped PROPERTIES RELEASE_POSTFIX "-${RELNUM}")
SET_TARGET_PROPERTIES(libzzipmmapped PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
endif()

Expand Down
5 changes: 4 additions & 1 deletion zzipwrap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ add_library(libzzipwrap ${libzzipwrap_SRCS} )
target_link_libraries(libzzipwrap libzzip ZLIB::ZLIB )
target_include_directories(libzzipwrap PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")

set_target_properties(libzzipwrap PROPERTIES OUTPUT_NAME "zzipwrap" RELEASE_POSTFIX "-${RELNUM}")
set_target_properties(libzzipwrap PROPERTIES OUTPUT_NAME "zzipwrap")
if(BUILD_SHARED_LIBS)
set_target_properties(libzzipwrap PROPERTIES RELEASE_POSTFIX "-${RELNUM}")
SET_TARGET_PROPERTIES(libzzipwrap PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM})
endif()
set_target_properties(libzzipwrap PROPERTIES DEFINE_SYMBOL "libzzip_EXPORTS")

add_executable(zzipwrap ${zzipwrap_SRCS} )
Expand Down