Skip to content

Commit

Permalink
Fix ms cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Oct 29, 2013
1 parent 996fc9d commit be590fa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mapscript/csharp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if (WIN32)
else(CMAKE_CL_64)
set(PLATFORM_TARGET /platform:x86)
endif(CMAKE_CL_64)
set (KEYFILE_SPEC /keyfile:${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\mapscript.snk)
endif (NOT MSVC71)
if (MSVC10)
set(PLATFORM_TARGET ${PLATFORM_TARGET} /define:CLR4)
Expand All @@ -35,14 +36,12 @@ set_target_properties(csharpmapscript PROPERTIES OUTPUT_NAME "mapscript")

SWIG_LINK_LIBRARIES(csharpmapscript ${MAPSERVER_LIBMAPSERVER})


ADD_CUSTOM_COMMAND(TARGET csharpmapscript
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
POST_BUILD
if (MSVC71)
COMMAND ${CSHARP_COMPILER} ${PLATFORM_TARGET} /t:library /out:mapscript_csharp.dll *.cs ${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\config\\AssemblyInfo.cs
else (MSVC71)
COMMAND ${CSHARP_COMPILER} ${PLATFORM_TARGET} /t:library /out:mapscript_csharp.dll /keyfile:${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\mapscript.snk *.cs ${PROJECT_SOURCE_DIR}\\mapscript\\csharp\\config\\AssemblyInfo.cs
endif (MSVC71)
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 ${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 be590fa

Please sign in to comment.