Skip to content

Commit

Permalink
moved apple build specific items into 'if' block for apple
Browse files Browse the repository at this point in the history
  • Loading branch information
defunctzombie committed Dec 4, 2010
1 parent cb16225 commit c8b20ce
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,35 +56,36 @@ ${CMAKE_CURRENT_SOURCE_DIR}/resources/mac/project.icns
)
target_link_libraries(${target} ${QT_LIBRARIES} poppler-qt4)

install(TARGETS takeoff BUNDLE DESTINATION . COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime)
if (APPLE)
install(TARGETS takeoff BUNDLE DESTINATION . COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime)

SET(plugin_dest_dir ${target}.app/Contents/MacOS)
SET(qtconf_dest_dir ${target}.app/Contents/Resources)
SET(plugin_dest_dir ${target}.app/Contents/MacOS)
SET(qtconf_dest_dir ${target}.app/Contents/Resources)

INSTALL(CODE "
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"\")
" COMPONENT Runtime)
INSTALL(CODE "
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"\")
" COMPONENT Runtime)

if (APPLE)
set(APPS ${CMAKE_INSTALL_PREFIX}/${target}.app)
endif()
set(APPS ${CMAKE_INSTALL_PREFIX}/${target}.app)

set(DIRS ${QT_LIBRARY_DIRS} /usr/local/lib)
set(DIRS ${QT_LIBRARY_DIRS} /usr/local/lib)

INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${plugin_dest_dir}/plugins COMPONENT Runtime)
INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${plugin_dest_dir}/plugins COMPONENT Runtime)

if (${QT_MAC_USE_COCOA} STREQUAL "1")
install(DIRECTORY ${QT_LIBRARY_DIR}/QtGui.framework/Resources/qt_menu.nib DESTINATION ${APPS}/Contents/Resources COMPONENT Runtime)
endif()
if (${QT_MAC_USE_COCOA} STREQUAL "1")
install(DIRECTORY ${QT_LIBRARY_DIR}/QtGui.framework/Resources/qt_menu.nib DESTINATION ${APPS}/Contents/Resources COMPONENT Runtime)
endif()

include(InstallRequiredSystemLibraries)

include(InstallRequiredSystemLibraries)
INSTALL(CODE "
file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
include(BundleUtilities)
fixup_bundle(\"${APPS}\" \"${QTPLUGINS}\" \"${DIRS}\")
" COMPONENT Runtime)

INSTALL(CODE "
file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
include(BundleUtilities)
fixup_bundle(\"${APPS}\" \"${QTPLUGINS}\" \"${DIRS}\")
" COMPONENT Runtime)
endif()

set(CPACK_BINARY_DRAGNDROP ON)
INCLUDE(CPack)
Expand Down

0 comments on commit c8b20ce

Please sign in to comment.