Skip to content

Commit

Permalink
Merge pull request #226 from mikkoi/fix-wrong-library-filename
Browse files Browse the repository at this point in the history
Fix wrong library filename (in Windows)
  • Loading branch information
brarcher committed Oct 20, 2019
2 parents 0b80af2 + 86fe1ba commit 003e225
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ set(HEADERS

configure_file(check.h.in check.h @ONLY)

# To maintain compatibility with the Autotools installation
# we specifically create both shared and static libraries
# as that is what Autotools script has been doing.
# Normally CMake would create the system's native default library type.

add_library(check STATIC ${SOURCES} ${HEADERS})

# We would like to create an OBJECT library but currently they are
Expand Down Expand Up @@ -148,7 +153,9 @@ if (MSVC)
# "On Windows you should probably give each library a different name,
# since there is a ".lib" file for both shared and static".
# https://stackoverflow.com/a/2152157/4716395
set(LIBRARY_OUTPUT_NAME "checkStatic")
# "Dynamic-Link Library" (DLL) is Microsoft terminology.
# So we call it this:
set(LIBRARY_OUTPUT_NAME "checkDynamic")
endif (MSVC)
set_target_properties(checkShared PROPERTIES
OUTPUT_NAME ${LIBRARY_OUTPUT_NAME}
Expand Down

0 comments on commit 003e225

Please sign in to comment.