]> git.lizzy.rs Git - nothing.git/commitdiff
Workaround if you are not running the Developer Command Prompt as user Administrator
authorhonneamise <albi@DESKTOP-11STS5G.localdomain>
Fri, 20 Dec 2019 11:13:06 +0000 (12:13 +0100)
committerhonneamise <albi@DESKTOP-11STS5G.localdomain>
Fri, 20 Dec 2019 11:13:06 +0000 (12:13 +0100)
CMakeLists.txt

index 4bf7a9ee155b21d18eeda3d5e001e0d7892336f3..218247375ba39f97ba8bc805a91ed6ca898df0f7 100644 (file)
@@ -165,8 +165,11 @@ add_executable(nothing
 )
 target_link_libraries(nothing ${SDL2_LIBRARIES})
 
-ADD_CUSTOM_TARGET(link_assets ALL
-                  COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/assets ${CMAKE_BINARY_DIR}/assets)
+if(WIN32)
+    ADD_CUSTOM_TARGET(link_assets ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/assets ${CMAKE_BINARY_DIR}/assets)
+else()
+    ADD_CUSTOM_TARGET(link_assets ALL COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/assets ${CMAKE_BINARY_DIR}/assets)
+endif()
 
 if(("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang"))
   set(CMAKE_C_FLAGS