Copy the plugin to the destination folder after build instead of the combination using LIBRARY_OUTPUT_DIRECTORY and PREFIX. This allows us to build the plugins as universal binaries. Closes #121
This commit is contained in:
parent
aff9b973a8
commit
c2be82e5d6
1 changed files with 7 additions and 2 deletions
|
@ -94,9 +94,14 @@ IF(Plugin_SRCS)
|
|||
TARGET_LINK_LIBRARIES( ${Plugin_NAME} ${Plugin_LIBRARIES} )
|
||||
|
||||
IF (APPLE)
|
||||
ADD_CUSTOM_COMMAND(TARGET ${Plugin_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${Plugin_NAME}.dylib
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/TelldusCenter.app/Contents/Plugins/script
|
||||
COMMENT "Copy plugin ${Plugin_NAME} to destination bundle"
|
||||
)
|
||||
SET_TARGET_PROPERTIES(${Plugin_NAME} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/TelldusCenter.app/Contents/Plugins/script
|
||||
PREFIX "../"
|
||||
PREFIX ""
|
||||
)
|
||||
INSTALL(CODE "
|
||||
GET_FILENAME_COMPONENT(DESTDIR \$ENV{DESTDIR} ABSOLUTE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue