Skip to content

Commit

Permalink
Merge pull request #11318 from dg0yt/64
Browse files Browse the repository at this point in the history
CMake: MSVC 64-bit cleanup
  • Loading branch information
rouault authored Nov 20, 2024
2 parents b533432 + 0a5148c commit 50585ef
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 117 deletions.
103 changes: 0 additions & 103 deletions cmake/modules/packages/FindDB2.cmake

This file was deleted.

6 changes: 0 additions & 6 deletions frmts/gtiff/libtiff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@ if (RENAME_INTERNAL_TIFF_SYMBOLS)
target_compile_definitions(libtiff PUBLIC -DRENAME_INTERNAL_LIBTIFF_SYMBOLS)
endif ()

if (MSVC)
if (CMAKE_CL_64)
target_compile_definitions(libtiff PRIVATE -D_WIN64)
endif ()
endif ()

set_target_properties(libtiff PROPERTIES CXX_STANDARD 11)
set_property(TARGET libtiff PROPERTY POSITION_INDEPENDENT_CODE ${GDAL_OBJECT_LIBRARIES_POSITION_INDEPENDENT_CODE})
target_sources(${GDAL_LIB_TARGET_NAME} PRIVATE $<TARGET_OBJECTS:libtiff>)
3 changes: 0 additions & 3 deletions gdal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,6 @@ target_include_directories(
if (MSVC)
target_sources(${GDAL_LIB_TARGET_NAME} PRIVATE gcore/Version.rc)
source_group("Resource Files" FILES gcore/Version.rc)
if (CMAKE_CL_64)
set_target_properties(${GDAL_LIB_TARGET_NAME} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
endif ()
endif ()

get_property(_plugins GLOBAL PROPERTY PLUGIN_MODULES)
Expand Down
6 changes: 1 addition & 5 deletions port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,7 @@ if (GDAL_USE_ODBC)
endif ()
endif ()

if (MSVC)
if (CMAKE_CL_64)
target_compile_definitions(cpl PRIVATE -D_WIN64)
endif ()
else ()
if (NOT MSVC)
if (Threads_FOUND)
gdal_target_link_libraries(cpl PRIVATE Threads::Threads)
endif ()
Expand Down

0 comments on commit 50585ef

Please sign in to comment.