Skip to content

Commit

Permalink
IDE-1124 Support build with 64bit Clienttools
Browse files Browse the repository at this point in the history
Remove hard-coded clienttools installation location
  • Loading branch information
xwang2713 committed Jan 16, 2024
1 parent 7bd67b9 commit d0e26db
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ PROJECT(ECLIDE)
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)

# General Options ---
option(EMBED_64BIT_CLIENTTOOLS "Embed 64bit client tools (OFF=32bit)" ON)

# Build tag generation ---
INCLUDE("${PROJECT_SOURCE_DIR}/version.cmake")

Expand Down Expand Up @@ -183,13 +186,18 @@ ENDIF()
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}_${version}-${stagever}${CPACK_SYSTEM_NAME}")
MESSAGE ("-- Current release version is ${CPACK_PACKAGE_FILE_NAME}")

find_file(CLIENTTOOLS_PACKAGE_FILE "hpccsystems-clienttools-community_${version}-${stagever}${CMAKE_SYSTEM_NAME}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.exe" HINTS ${CMAKE_CURRENT_BINARY_DIR}/../HPCC-Platform )
SET(CT_ARCH "i386")
IF (EMBED_64BIT_CLIENTTOOLS)
SET(CT_ARCH "x86_64")
ENDIF ()

find_file(CLIENTTOOLS_PACKAGE_FILE "hpccsystems-clienttools-community_${version}-${stagever}${CMAKE_SYSTEM_NAME}-${CT_ARCH}.exe" HINTS ${CMAKE_CURRENT_BINARY_DIR}/../HPCC-Platform )
MESSAGE ("-- Clienttools package: ${CLIENTTOOLS_PACKAGE_FILE}")
if (CLIENTTOOLS_PACKAGE_FILE)
install ( PROGRAMS ${CLIENTTOOLS_PACKAGE_FILE} DESTINATION tmp )
get_filename_component(CLIENTTOOLS_PACKAGE_FILE_NAME ${CLIENTTOOLS_PACKAGE_FILE} NAME)
list ( APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
ExecWait '$INSTDIR\\\\tmp\\\\${CLIENTTOOLS_PACKAGE_FILE_NAME} /S /D=$INSTDIR\\\\..\\\\clienttools'
ExecWait '$INSTDIR\\\\tmp\\\\${CLIENTTOOLS_PACKAGE_FILE_NAME} /S'
")
endif (CLIENTTOOLS_PACKAGE_FILE)

Expand Down

0 comments on commit d0e26db

Please sign in to comment.