[CMake] Concise Example of BundleUtilities for Windows

Dave Partyka dave.partyka at kitware.com
Sat Dec 11 12:43:12 EST 2010


Whats wrong with ParaView's CMake code? ;-)

The relevant section to doing bundle utilities on non Mac Platforms is this
blob from ParaView\Applications\ParaView\CMakeLists.txt

set(DIRS) # directories to search for prerequisites

IF(PARAVIEW_BUILD_QT_GUI)
  list(APPEND DIRS ${QT_BINARY_DIR} ${QT_LIBRARY_DIR})
ENDIF(PARAVIEW_BUILD_QT_GUI)

IF(VTK_USE_FFMPEG_ENCODER)
  get_filename_component(FFMPEG_DIR "${FFMPEG_avcodec_LIBRARY}" PATH)
  list(APPEND DIRS ${FFMPEG_DIR})
ENDIF(VTK_USE_FFMPEG_ENCODER)

IF(PARAVIEW_ENABLE_PYTHON)
  get_filename_component(PYTHON_BIN_DIR "${PYTHON_EXECUTABLE}" PATH)
  get_filename_component(PYTHON_LIB_DIR "${PYTHON_LIBRARY}" PATH)
  list(APPEND DIRS ${PYTHON_BIN_DIR} ${PYTHON_LIB_DIR})
ENDIF(PARAVIEW_ENABLE_PYTHON)

IF(PARAVIEW_USE_MPI)
  get_filename_component(MPI_LIB_DIR "${MPI_LIBRARY}" PATH)
  get_filename_component(MPI_BIN_DIR "${MPIEXEC}" PATH)
  list(APPEND DIRS ${MPI_LIB_DIR} ${MPI_BIN_DIR})
ENDIF(PARAVIEW_USE_MPI)

set(_extension)
set(_dir "${PV_INSTALL_LIB_DIR}")
IF(WIN32)
  set(_extension ".exe")
  set(_dir "bin")
ENDIF(WIN32)

set(APPS "\${CMAKE_INSTALL_PREFIX}/${_dir}/paraview${_extension}")  # paths
to executables

# run Bundle utilities
INSTALL(CODE "
   include(\"${ParaView_CMAKE_DIR}/BundleUtilities.cmake\")
   fixup_bundle(\"${APPS}\"   \"\"   \"${DIRS}\")
   " COMPONENT BrandedRuntime)

On Sat, Dec 11, 2010 at 12:31 PM, Michael Jackson <
mike.jackson at bluequartz.net> wrote:

> Is there a concise example for BundleUtilites aimed at Windows? I
> _think_ I get how to use it on OS X but I am failing miserably on
> Windows side of things. My installation code is turning into a mess
> currently due to using BundleUtilities on the OS X side and manually
> writing CMake code to move stuff around on the Windows side.
>
>  Any help is appreciated. I tried walking through the ParaView CMake
> code but that proved almost impossible.
>
> Thanks
> _________________________________________________________
> Mike Jackson                  mike.jackson at bluequartz.net
> BlueQuartz Software                    www.bluequartz.net
> Principal Software Engineer                  Dayton, Ohio
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101211/7ba1d4a5/attachment.htm>


More information about the CMake mailing list