Skip to content

Commit

Permalink
Update CPack tar package naming on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragkh committed Jul 6, 2018
1 parent efb4ba4 commit c0d8e32
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,20 @@ set(CPACK_RPM_PACKAGE_LICENSE "BSD")
set(CPACK_RPM_PACKAGE_URL "${PACKAGE_URL}")
set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_LIST_DIR}/ChangeLog.txt")

string(TOLOWER "${CMAKE_SYSTEM_NAME}" CPACK_SYSTEM_NAME)
if (APPLE)
set(CPACK_PACKAGE_ARCHITECTURE darwin)
execute_process(
COMMAND uname -p
RESULT_VARIABLE RV
OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
)
execute_process(COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
if (CPACK_PACKAGE_ARCHITECTURE MATCHES "x86_64")
set(CPACK_PACKAGE_ARCHITECTURE amd64)
else ()
set(CPACK_PACKAGE_ARCHITECTURE i386)
endif ()
else ()
string(TOLOWER "${CMAKE_SYSTEM_NAME}" CPACK_SYSTEM_NAME)
if (CMAKE_CXX_FLAGS MATCHES "-m32")
set(CPACK_PACKAGE_ARCHITECTURE i386)
else ()
Expand Down

0 comments on commit c0d8e32

Please sign in to comment.