fixbundle.cmake.win.in 1.34 KB
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# gp_item_default_embedded_path_override item default_embedded_path_var
#
# Return the path that others should refer to the item by when the item
# is embedded inside a bundle.
#
# This is a project-specific override of BundleUtilities.cmake's
# gp_item_default_embedded_path
#
function(gp_item_default_embedded_path_override item default_embedded_path_var)

  # By default, embed items as set by gp_item_default_embedded_path:
  #
  set(path "${${default_embedded_path_var}}")

  # ...embed *.dll in the Plugins folder:
  # Or better: leave them where they are
  if(item MATCHES ".*Plugin-.*.dll")
    set(path "@CMAKE_BINARY_DIR@/Build/Plugins")
  endif()

  set(${default_embedded_path_var} "${path}" PARENT_SCOPE)
endfunction(gp_item_default_embedded_path_override)

include (BundleUtilities)

# Find all plugins
file (GLOB _plugins "@CMAKE_BINARY_DIR@/Build/Plugins/*.dll")

# fix all dependencies
30
fixup_bundle ("@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.exe" "${_plugins}" "@OMP_PATH@;@GLUT_LIBRARY_DIR@;@Qwt5_Qt4_LIBRARY_DIR@;@GLEW_LIBRARY_DIR@;@QT_BINARY_DIR@;@FTGL_LIBRARY_DIRS@;@FREETYPE_LIBRARY_DIR@;@NITE2_LIBRARY_DIR@;@OPENNI2_LIBRARY_DIR@;@QWT6_LIBRARY_DIR@;@ASSIMP_LIBRARY_DIR@;@CGAL_BIN_DIR@;@GUROBI_BIN_DIR@;@IPOPT_LIBRARY_DIR@;@WINDOWS_COPY_LIBDIRS@;@Boost_LIBRARYDIR@;@Boost_LIBRARY_DIRS@;@Python3_LIBRARY_DIRS@;@Python3_LIBRARY_DIRS@/../")