2012-08-13 21:47:32 +04:00
|
|
|
add_library(jumpShared SHARED jumpShared.cxx)
|
2004-01-22 18:51:34 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(WIN32 OR CYGWIN)
|
|
|
|
set(SHARED_MUST_BE_IN_EXE_DIR 1)
|
|
|
|
endif()
|
2004-04-02 18:43:35 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(APPLE)
|
|
|
|
set(SHARED_MUST_BE_IN_EXE_DIR 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2004-04-02 18:43:35 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(SHARED_MUST_BE_IN_EXE_DIR)
|
|
|
|
set(LIB_NAME
|
2004-01-22 18:51:34 +03:00
|
|
|
${CMAKE_SHARED_LIBRARY_PREFIX}jumpShared${CMAKE_SHARED_LIBRARY_SUFFIX})
|
2012-08-13 21:47:32 +04:00
|
|
|
set(EXE_DIR ${Jump_BINARY_DIR}/Executable)
|
|
|
|
if(EXECUTABLE_OUTPUT_PATH)
|
|
|
|
set(EXE_DIR ${EXECUTABLE_OUTPUT_PATH})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(LIB_DIR ${Jump_BINARY_DIR}/Library/Shared)
|
|
|
|
if(LIBRARY_OUTPUT_PATH)
|
|
|
|
set(LIB_DIR ${LIBRARY_OUTPUT_PATH})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
add_custom_command(TARGET jumpShared
|
2004-01-22 18:51:34 +03:00
|
|
|
POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy
|
|
|
|
${LIB_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME}
|
|
|
|
${EXE_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|