Skip to content

Commit

Permalink
add cfg option to have driver's name respect SFN
Browse files Browse the repository at this point in the history
- add CMake option to strip the '32' suffix from x86 driver name.

This will allow the WiX-gen'd MSI perform the installation&config.
  • Loading branch information
bpintea committed Dec 8, 2018
1 parent eb183cc commit 35f4f74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set(VERSION_QUALIFIER $ENV{VERSION_QUALIFIER} CACHE STRING

# build a UNICODE driver? (the only supported way currently)
set(IS_UNICODE 1)
# should the ODBC driver's name respect the Short Format Name?
set(SFN_DRV_NAME 1)

#include(GenerateExportHeader)

Expand Down Expand Up @@ -52,7 +54,11 @@ else (${IS_UNICODE})
endif (${IS_UNICODE})

# driver name (ANSI/Unicode x 32/64)
set(DRV_NAME "${DRIVER_BASE_NAME}${PROJECT_VERSION_MAJOR}${ENCODING}${BARCH}")
if (${SFN_DRV_NAME})
set(DRV_NAME "${DRIVER_BASE_NAME}${PROJECT_VERSION_MAJOR}${ENCODING}")
else (${SFN_DRV_NAME})
set(DRV_NAME "${DRIVER_BASE_NAME}${PROJECT_VERSION_MAJOR}${ENCODING}${BARCH}")
endif (${SFN_DRV_NAME})

# Turn on the ability to create folders to organize projects (.vcproj)
# It creates "CMakePredefinedTargets" folder by default and adds CMake
Expand Down

0 comments on commit 35f4f74

Please sign in to comment.