Skip to content

Commit

Permalink
this fix allows to have an out-of-source build on any location - prev…
Browse files Browse the repository at this point in the history
…iously it was assumed that the mapscript csharp sources had a fixed path relative to the build
  • Loading branch information
micking committed Jun 28, 2017
1 parent 89810ed commit 8f475c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mapscript/csharp/CMakeLists.txt
Expand Up @@ -44,8 +44,10 @@ SWIG_LINK_LIBRARIES(csharpmapscript ${MAPSERVER_LIBMAPSERVER})
ADD_CUSTOM_COMMAND(TARGET csharpmapscript
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
POST_BUILD
COMMAND copy /Y ..\\..\\..\\mapscript\\csharp\\mapscript.snk
COMMAND ${CSHARP_COMPILER} ${PLATFORM_TARGET} /t:library /out:mapscript_csharp.dll ${KEYFILE_SPEC} *.cs ${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\config\\AssemblyInfo.cs
COMMAND set MAPSCRIPT_SNK=${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\mapscript.snk
COMMAND set MAPSCRIPT_SNK=%MAPSCRIPT_SNK:/=\\%
COMMAND copy /Y %MAPSCRIPT_SNK%
COMMAND ${CSHARP_COMPILER} ${PLATFORM_TARGET} /t:library /out:mapscript_csharp.dll ${KEYFILE_SPEC} *.cs ${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\config\\AssemblyInfo.cs
COMMAND ${CSHARP_COMPILER} ${PLATFORM_TARGET} /r:mapscript_csharp.dll /out:shpdump.exe ${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\examples\\shpdump.cs
COMMAND ${CSHARP_COMPILER} ${PLATFORM_TARGET} /r:mapscript_csharp.dll /out:drawmap.exe ${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\examples\\drawmap.cs
COMMAND ${CSHARP_COMPILER} ${PLATFORM_TARGET} /r:mapscript_csharp.dll /out:shapeinfo.exe ${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\examples\\shapeinfo.cs
Expand Down

0 comments on commit 8f475c6

Please sign in to comment.