27 lines
804 B
CMake
27 lines
804 B
CMake
ADD_LIBRARY(jumpShared SHARED jumpShared.cxx)
|
|
|
|
IF(WIN32 OR CYGWIN)
|
|
SET(SHARED_MUST_BE_IN_EXE_DIR 1)
|
|
ENDIF()
|
|
|
|
IF(APPLE)
|
|
SET(SHARED_MUST_BE_IN_EXE_DIR 1)
|
|
ENDIF(APPLE)
|
|
|
|
IF(SHARED_MUST_BE_IN_EXE_DIR)
|
|
SET(LIB_NAME
|
|
${CMAKE_SHARED_LIBRARY_PREFIX}jumpShared${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
SET(EXE_DIR ${Jump_BINARY_DIR}/Executable)
|
|
IF(EXECUTABLE_OUTPUT_PATH)
|
|
SET(EXE_DIR ${EXECUTABLE_OUTPUT_PATH})
|
|
ENDIF(EXECUTABLE_OUTPUT_PATH)
|
|
SET(LIB_DIR ${Jump_BINARY_DIR}/Library/Shared)
|
|
IF(LIBRARY_OUTPUT_PATH)
|
|
SET(LIB_DIR ${LIBRARY_OUTPUT_PATH})
|
|
ENDIF(LIBRARY_OUTPUT_PATH)
|
|
ADD_CUSTOM_COMMAND(TARGET jumpShared
|
|
POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy
|
|
${LIB_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME}
|
|
${EXE_DIR}/${CMAKE_CFG_INTDIR}/${LIB_NAME})
|
|
ENDIF(SHARED_MUST_BE_IN_EXE_DIR)
|