9db3116226
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
27 lines
733 B
CMake
27 lines
733 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()
|
|
|
|
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()
|
|
set(LIB_DIR ${Jump_BINARY_DIR}/Library/Shared)
|
|
if(LIBRARY_OUTPUT_PATH)
|
|
set(LIB_DIR ${LIBRARY_OUTPUT_PATH})
|
|
endif()
|
|
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()
|