Skip to content

Commit

Permalink
Merge branch 'master' into cmake_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
richardeakin committed Jun 25, 2017
2 parents 7b45348 + 1271762 commit f0c3fc3
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions proj/cmake/modules/cinderMakeApp.cmake
Expand Up @@ -188,14 +188,34 @@ function( ci_make_app )

file( COPY "${ARG_ASSETS_PATH}" DESTINATION "${ASSETS_DEST_PATH}" )
else()
# make a symlink
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "create_symlink" "${ARG_ASSETS_PATH}" "${ASSETS_DEST_PATH}"
RESULT_VARIABLE resultCode
)
if( CINDER_MSW )

# Get OS dependent path to use in `execute_process`
file( TO_NATIVE_PATH "${ASSETS_DEST_PATH}" link )
file( TO_NATIVE_PATH "${ARG_ASSETS_PATH}" target )
set( link_cmd cmd.exe /c mklink /J ${link} ${target} )
# make a windows symlink using mklink
execute_process(
COMMAND ${link_cmd}
RESULT_VARIABLE resultCode
ERROR_VARIABLE errorMessage
)

if( NOT resultCode EQUAL 0 )
message( WARNING "\nFailed to symlink '${ARG_ASSETS_PATH}' to '${ASSETS_DEST_PATH}', result: ${resultCode} error: ${errorMessage}" )
endif()

else()
# make a symlink
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "create_symlink" "${ARG_ASSETS_PATH}" "${ASSETS_DEST_PATH}"
RESULT_VARIABLE resultCode
)

if( NOT resultCode EQUAL 0 )
message( WARNING "Failed to symlink '${ARG_ASSETS_PATH}' to '${ASSETS_DEST_PATH}', result: ${resultCode}" )
endif()

if( NOT resultCode EQUAL 0 )
message( WARNING "Failed to symlink '${ARG_ASSETS_PATH}' to '${ASSETS_DEST_PATH}', result: ${resultCode}" )
endif()
endif()
endif()
Expand Down

0 comments on commit f0c3fc3

Please sign in to comment.