Skip to content

Instantly share code, notes, and snippets.

@bigeasy
Created August 5, 2012 21:10
Show Gist options
  • Save bigeasy/3267134 to your computer and use it in GitHub Desktop.
Save bigeasy/3267134 to your computer and use it in GitHub Desktop.
CMakeLists.txt
cmake_minimum_required (VERSION 2.6)
include(BundleUtilities)
project(synapse)
if (UNIX)
set(gecko_defs "-DXP_UNIX")
if(APPLE)
set(gecko_defs "${gecko_defs} -DXP_MACOSX")
endif()
endif()
set(SOURCES Info.plist
plugin.c
vendor/attendant/attendant_posix.c
vendor/attendant/errors.c
)
add_library(synapse MODULE ${SOURCES})
add_executable(relay vendor/attendant/relay_posix.c vendor/attendant/errors.c)
set_target_properties(synapse PROPERTIES
BUNDLE 1
BUNDLE_EXTENSION plugin
XCODE_ATTRIBUTE_WRAPPER_EXTENSION plugin
XCODE_ATTRIBUTE_MACH_O_TYPE mh_bundle
XCODE_ATTRIBUTE_INFOPLIST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
LINK_FLAGS "-lcurl -fpcc-struct-return -W1,-exported_symbols_list,\"${CMAKE_CURRENT_BINARY_DIR}/exports.txt\"")
if (APPLE)
INSTALL(TARGETS ${CMAKE_CURRENT_BINARY_DIR}/relay DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/synapse.plugin/Contents/MacOS)
INSTALL(FILES /opt/bin/node DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/synapse.plugin/Contents/MacOS)
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment