Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: avoid ADD_DEPENDENCIES if dependencies empty #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ IF(NOT USE_SYSTEM_HDF5)
SET(MINC2_deps ${MINC2_deps} HDF5)
ENDIF(NOT USE_SYSTEM_HDF5)

ADD_DEPENDENCIES(minc2 ${MINC2_deps})
IF(MINC2_deps)
ADD_DEPENDENCIES(minc2 ${MINC2_deps})
ENDIF(MINC2_deps)

IF(MT_BUILD_SHARED_LIBS)
ADD_DEPENDENCIES(minc2_static ${MINC2_deps})
ENDIF(MT_BUILD_SHARED_LIBS)
IF(MT_BUILD_SHARED_LIBS AND MINC2_deps)
ADD_DEPENDENCIES(minc2_static ${MINC2_deps})
ENDIF(MT_BUILD_SHARED_LIBS AND MINC2_deps)

# Setup main minc variables
SET(LIBMINC_USE_FILE ${CMAKE_BINARY_DIR}/libminc/UseLIBMINC.cmake CACHE INTERNAL "LIBMINC use file")
Expand Down Expand Up @@ -392,19 +394,19 @@ ENDIF(MT_BUILD_VISUAL_TOOLS)
# DO nothing?
IF(USE_SUPERBUILD)
#install external dependencies to final destination
INSTALL(DIRECTORY ${SUPERBUILD_STAGING_PREFIX}/${CMAKE_INSTALL_PREFIX}/bin
INSTALL(DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin
DESTINATION .
PATTERN *
PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE )

INSTALL(DIRECTORY ${SUPERBUILD_STAGING_PREFIX}/${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
INSTALL(DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
DESTINATION .)

INSTALL(DIRECTORY ${SUPERBUILD_STAGING_PREFIX}/${CMAKE_INSTALL_PREFIX}/include
INSTALL(DIRECTORY ${CMAKE_INSTALL_PREFIX}/include
DESTINATION .)

# do we really need to install share?
INSTALL(DIRECTORY ${SUPERBUILD_STAGING_PREFIX}/${CMAKE_INSTALL_PREFIX}/share
INSTALL(DIRECTORY ${CMAKE_INSTALL_PREFIX}/share
DESTINATION .)
ENDIF(USE_SUPERBUILD)

Expand Down