Skip to content

Commit

Permalink
Fixed prepackage.cmake for Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Jan 31, 2023
1 parent aa3856d commit a151194
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/prepackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ message( STATUS "CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}" )
message( STATUS "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" )
message( STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}" )

#
# According to the CMAKE docs CMAKE_INSTALL_PREFIX should point to the
# install directory, but on Linux, macOS and Windows each path is different.
#
if ( UNIX AND NOT APPLE )
set( ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/../../../../../../../../../" )
else()
elseif(APPLE)
set( ROOT_DIR "${CMAKE_INSTALL_PREFIX}/../../../../../../../../../../../../" )
else()
set( ROOT_DIR "${CMAKE_INSTALL_PREFIX}/../../../../../../../../../" )
endif()

message( STATUS "ROOT_DIR=${ROOT_DIR}" )
Expand Down Expand Up @@ -51,6 +57,6 @@ if( UNIX)
if ( APPLE )
else()
get_runtime_dependencies( ${EXES} DEPENDENCIES )
file( COPY ${DEPENDENCIES} DESTINATION "${CPACK_PREPACKAGE}/lib/" )
file( COPY ${DEPENDENCIES} DESTINATION "${CPACK_PREPACKAGE}/lib/" )
endif()
endif()

0 comments on commit a151194

Please sign in to comment.