PROJECT(C3DGUI_LAUNCHER)

# -- EXPERIMENTAL --
IF(NOT WIN32 AND NOT APPLE)
  SET(C3DGUI_EXE_INSTALL ${C3DGUI_MAIN_INSTALL_DIR})
  SET(C3DGUI_FORWARD_DIR_BUILD "${CMAKE_BINARY_DIR}/gui/bin")
  SET(C3DGUI_FORWARD_DIR_INSTALL "../${C3DGUI_EXE_INSTALL}")
  SET(C3DGUI_FORWARD_PATH_BUILD "\"${C3DGUI_FORWARD_DIR_BUILD}\"")
  SET(C3DGUI_FORWARD_PATH_INSTALL "\"${C3DGUI_FORWARD_DIR_INSTALL}\"")
  SET(C3DGUI_FORWARD_EXE ${C3DGUI_BUNDLE_NAME})
  CONFIGURE_FILE(
    ${CONVERT3D_SOURCE_DIR}/gui/Utilities/Forwarding/SharedForwardExe.c.in
    ${CMAKE_CURRENT_BINARY_DIR}/shared-forward.c
    @ONLY IMMEDIATE)
  ADD_EXECUTABLE(c3d_gui ${CMAKE_CURRENT_BINARY_DIR}/shared-forward.c)
  ADD_DEPENDENCIES(c3d_gui ${C3DGUI_EXE})
  INSTALL(TARGETS c3d_gui RUNTIME DESTINATION bin)
ENDIF(NOT WIN32 AND NOT APPLE)

