[libpng15] Revised CMakeLists.txt to not attempt to make a symlink under mingw.

This commit is contained in:
Glenn Randers-Pehrson
2012-05-29 05:56:49 -05:00
parent e9a249eee7
commit 0e23e2ad9f
3 changed files with 8 additions and 6 deletions

View File

@@ -184,7 +184,7 @@ ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
# copies if different.
macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
if(WIN32 AND NOT CYGWIN AND NOT MINGW)
if(WIN32 AND NOT CYGWIN AND NOT MSYS)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
@@ -192,10 +192,10 @@ macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC}
)
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
else(WIN32 AND NOT CYGWIN AND NOT MINGW)
else(WIN32 AND NOT CYGWIN AND NOT MSYS)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif(WIN32 AND NOT CYGWIN AND NOT MINGW)
endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
endmacro()
# libpng is a library so default to 'lib'