Skip to content

Commit

Permalink
Handle empty build vendor better
Browse files Browse the repository at this point in the history
If wxAutoExcel_BUILD_VENDOR is empty, do not add a trailing underscore
in the DLL file name.

No real change.
  • Loading branch information
PBfordev committed Apr 2, 2024
1 parent 0b762db commit 42f4636
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,15 @@ if(NOT MSVC)
set_target_properties(wxAutoExcel PROPERTIES IMPORT_SUFFIX ".a")
endif()

set_target_properties(wxAutoExcel PROPERTIES
RUNTIME_OUTPUT_NAME "${wxAutoExcel_DLL_NAME_MAIN}_${wxAutoExcel_DLL_NAME_FLAVOR}_${wxAutoExcel_BUILD_VENDOR}"
RUNTIME_OUTPUT_NAME_DEBUG "${wxAutoExcel_DLL_NAME_MAIN}${CMAKE_DEBUG_POSTFIX}_${wxAutoExcel_DLL_NAME_FLAVOR}_${wxAutoExcel_BUILD_VENDOR}"
if (NOT "${wxAutoExcel_BUILD_VENDOR}" STREQUAL "")
set(VENDOR_SUFFIX "_${wxAutoExcel_BUILD_VENDOR}")
else()
set(VENDOR_SUFFIX "")
endif()

set_target_properties(wxAutoExcel PROPERTIES
RUNTIME_OUTPUT_NAME "${wxAutoExcel_DLL_NAME_MAIN}_${wxAutoExcel_DLL_NAME_FLAVOR}${VENDOR_SUFFIX}"
RUNTIME_OUTPUT_NAME_DEBUG "${wxAutoExcel_DLL_NAME_MAIN}${CMAKE_DEBUG_POSTFIX}_${wxAutoExcel_DLL_NAME_FLAVOR}${VENDOR_SUFFIX}"
)

# for static and import libraries
Expand Down

0 comments on commit 42f4636

Please sign in to comment.