Skip to content

Commit 5c2ed07

Browse files
committed
Fix some library issues in CMake config for Windows build.
See #24.
1 parent 1138f8a commit 5c2ed07

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ if(MSVC)
4848
find_library(GETOPT_LIBRARY NAMES wingetopt)
4949
if(GETOPT_INCLUDE_DIR AND GETOPT_LIBRARY)
5050
include_directories(${GETOPT_INCLUDE_DIR})
51-
list(APPEND OSMIUM_LIBRARIES ${GETOPT_LIBRARY})
5251
else()
5352
set(GETOPT_MISSING 1)
5453
endif()
@@ -240,6 +239,7 @@ endif(PANDOC)
240239
#-----------------------------------------------------------------------------
241240

242241
find_library(GEOS_C_LIBRARIES NAMES geos_c)
242+
include_directories (SYSTEM ${GEOS_C_INCLUDE_DIR})
243243

244244
add_definitions(${OSMIUM_WARNING_OPTIONS})
245245

src/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
#-----------------------------------------------------------------------------
88

99
add_executable(osmcoastline osmcoastline.cpp coastline_ring.cpp coastline_ring_collection.cpp coastline_polygons.cpp output_database.cpp srs.cpp options.cpp)
10-
target_link_libraries(osmcoastline ${OSMIUM_IO_LIBRARIES} ${GDAL_LIBRARIES} ${GEOS_C_LIBRARIES})
10+
target_link_libraries(osmcoastline ${OSMIUM_IO_LIBRARIES} ${GDAL_LIBRARIES} ${GEOS_C_LIBRARIES} ${GETOPT_LIBRARY})
1111
install(TARGETS osmcoastline DESTINATION bin)
1212

1313
add_executable(osmcoastline_filter osmcoastline_filter.cpp)
14-
target_link_libraries(osmcoastline_filter ${OSMIUM_IO_LIBRARIES})
14+
target_link_libraries(osmcoastline_filter ${OSMIUM_IO_LIBRARIES} ${GETOPT_LIBRARY})
1515
install(TARGETS osmcoastline_filter DESTINATION bin)
1616

1717
add_executable(osmcoastline_segments osmcoastline_segments.cpp srs.cpp)
18-
target_link_libraries(osmcoastline_segments ${GDAL_LIBRARIES})
18+
target_link_libraries(osmcoastline_segments ${GDAL_LIBRARIES} ${GETOPT_LIBRARY})
1919
install(TARGETS osmcoastline_segments DESTINATION bin)
2020

2121
add_executable(osmcoastline_ways osmcoastline_ways.cpp return_codes.hpp)

0 commit comments

Comments
 (0)