Created
August 18, 2022 09:01
-
-
Save mapcentia/b3ec12690c0aab01e2cc98929a3a4117 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.22) | |
project(ogr2postgis) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_SYSTEM_NAME Windows) | |
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) | |
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-c++) | |
add_executable(ogr2postgis src/ogr2postgis.cpp) | |
target_link_libraries(ogr2postgis gdal -l:libwinpthread.a) | |
add_custom_command(TARGET ogr2postgis POST_BUILD | |
COMMAND ${CMAKE_COMMAND} -E copy_directory | |
"${PROJECT_SOURCE_DIR}/libs" | |
$<TARGET_FILE_DIR:ogr2postgis>) | |
add_custom_command(TARGET ogr2postgis POST_BUILD | |
COMMAND ${CMAKE_COMMAND} -E copy_if_different | |
"${PROJECT_SOURCE_DIR}/README.md" | |
$<TARGET_FILE_DIR:ogr2postgis>) | |
add_custom_command(TARGET ogr2postgis POST_BUILD | |
COMMAND ${CMAKE_COMMAND} -E copy_if_different | |
"${PROJECT_SOURCE_DIR}/LICENSE" | |
$<TARGET_FILE_DIR:ogr2postgis>) | |
install(TARGETS ogr2postgis DESTINATION /c/msys64/ucrt64/bin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment