Commit 39790e9d authored by Jeremy Cohen's avatar Jeremy Cohen

Added tplib macro update, modified changelog.

parent efcb482b
Pipeline #1963 failed with stages
in 135 minutes and 31 seconds
......@@ -28,6 +28,7 @@ v5.1.0
**BuildSystem**
- Toggle build type (!1135)
- Updated minimum required CMake version to 3.5.1 (!1152)
v5.0.1
------
......
......@@ -12,6 +12,14 @@
# `-llibname` to the linker flags. This avoids the issue of e.g. linking against
# an outdated system zlib installation.
#
# On Windows, it is necessary to link using .lib files which will have been
# generated based on whether the target library was built as STATIC or SHARED.
# Where the library has been built as a SHARED library the associated DLLs
# are used at runtime. The setting of LIBTYPE determines the file names to
# link against so on Windows setting this to SHARED results in trying to link
# against .dll files. LIBTYPE is therefore forced to be STATIC on WIN32
# platforms to ensure linking against the .lib files.
#
# Arguments:
# - `varname`: variable name containing the third-party library name. On
# output will be altered to update the correct path.
......@@ -24,7 +32,12 @@ MACRO(THIRDPARTY_LIBRARY varname)
CMAKE_PARSE_ARGUMENTS(TPLIB "" "DESCRIPTION" "STATIC;SHARED" ${ARGN})
IF(TPLIB_SHARED)
SET(LIBTYPE "SHARED")
IF(WIN32)
# Ensure linking against .lib files on Windows
SET(LIBTYPE "STATIC")
ELSE()
SET(LIBTYPE "SHARED")
ENDIF()
SET(TPLIBS ${TPLIB_SHARED})
ELSEIF(TPLIB_STATIC)
SET(LIBTYPE "STATIC")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment