Fix:Build:MSVC fixes|Thanks chollya
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 24 Jan 2011 16:27:14 +0000 (16:27 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 24 Jan 2011 16:27:14 +0000 (16:27 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3993 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/maptool/CMakeLists.txt

index 29c51a0..1db7187 100644 (file)
@@ -2,10 +2,16 @@
 if(BUILD_MAPTOOL)
    add_definitions( -DMODULE=maptool )
    include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-   add_library (maptool_core boundaries.c buffer.c ch.c coastline.c geom.c itembin.c itembin_buffer.c misc.c osm.c sourcesink.c tempfile.c tile.c zip.c
-                osm_protobuf.c osm_protobufdb.c generated-code/fileformat.pb-c.c generated-code/osmformat.pb-c.c google/protobuf-c/protobuf-c.c osm_xml.c)
+   SET(MAPTOOL_SOURCE boundaries.c buffer.c ch.c coastline.c geom.c itembin.c itembin_buffer.c misc.c osm.c sourcesink.c tempfile.c tile.c zip.c osm_xml.c)
+   if(NOT MSVC)
+       SET(MAPTOOL_SOURCE ${MAPTOOL_SOURCE} osm_protobuf.c osm_protobufdb.c generated-code/fileformat.pb-c.c generated-code/osmformat.pb-c.c google/protobuf-c/protobuf-c.c)
+   endif(NOT MSVC)
+   add_library (maptool_core ${MAPTOOL_SOURCE})
    add_executable (maptool maptool.c)
-   target_link_libraries(maptool maptool_core navit_core ${NAVIT_LIBS} m)
+   if(NOT MSVC)
+        SET(NAVIT_LIBS ${NAVIT_LIBS} m)
+   endif(NOT MSVC)
+   target_link_libraries(maptool maptool_core navit_core ${NAVIT_LIBS})
 
    install(TARGETS maptool
            DESTINATION ${BIN_DIR}