4
0
mirror of https://github.com/QuasarApp/LIEF.git synced 2025-05-13 03:39:34 +00:00

Merge pull request from rafael-santiago/master

Changing library artifact suffix take into consideration CRT choice on MSVC based builds
This commit is contained in:
Romain 2020-11-06 17:03:03 +01:00 committed by GitHub
commit a76eb4a4f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -453,10 +453,23 @@ endif()
find_package(cppcheck)
set_target_properties(
LIB_LIEF
PROPERTIES OUTPUT_NAME LIEF
CLEAN_DIRECT_OUTPUT 1)
if (MSVC)
string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type)
if (build_type STREQUAL "debug")
set(CRT_OUTPUT_SUFFIX ${LIEF_USE_CRT_DEBUG})
else()
set(CRT_OUTPUT_SUFFIX ${LIEF_USE_CRT_RELEASE})
endif()
set_target_properties(
LIB_LIEF
PROPERTIES OUTPUT_NAME LIEF${CRT_OUTPUT_SUFFIX}
CLEAN_DIRECT_OUTPUT 1)
else()
set_target_properties(
LIB_LIEF
PROPERTIES OUTPUT_NAME LIEF
CLEAN_DIRECT_OUTPUT 1)
endif()
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)