Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: remove unnecessary WITH_TIFF and IF() #123

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

nono303
Copy link

@nono303 nono303 commented Jun 14, 2024

#122 (comment)

  • TIFF & PROJ : REQUIRED
    • So WITH_TIFF option doesn’t make sense, in my point of view
  • Zlib & JPEG also REQUIRED if WITH_x option is set
  • As find_package(x REQUIRED) failed if not FOUND, if(x_FOUND) is not necessary

libgeotiff/CMakeLists.txt Outdated Show resolved Hide resolved
libgeotiff/CMakeLists.txt Outdated Show resolved Hide resolved
libgeotiff/CMakeLists.txt Outdated Show resolved Hide resolved
@nono303
Copy link
Author

nono303 commented Jun 14, 2024

...Not sure to have done it in a clean way (between your commits & suggest resulting "dirty" merge 36e5a2b) but I double checked and

  • all the 3 points resolved
  • find package validated
  • final build clean and complete
cmake -LAH
-DCMAKE_FIND_DEBUG_MODE=1
-DCMAKE_CXX_FLAGS_INIT=/std:c++latest
-DCMAKE_C_FLAGS_INIT=/std:clatest
-DCMAKE_PREFIX_PATH=C:\sdk\release\vs17_x64-avx2;C:\sdk\release\vs17_x64-avx2\_openssl\openssl;C:\sdk\release\vs17_x64-avx2\_gdal;C:\sdk\release\vs17_x64-avx2\_proj;B:\serveur\mysql
-DCMAKE_FIND_USE_CMAKE_PATH=ON
-DCMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH=OFF
-DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH=ON
-DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=OFF
-DCMAKE_FIND_USE_INSTALL_PREFIX=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo -G "Ninja"
-DCMAKE_INSTALL_PREFIX=C:\sdk\release\vs17_x64-avx2
-DBUILD_SHARED_LIBS=ON
-DWITH_UTILITIES=OFF
-DWITH_TOWGS84=ON
-DBUILD_DOC=OFF
-DBUILD_MAN=OFF
-DINTERFACE_LIB_PREFIX= C:\sdk\src\libgeotiff\libgeotiff 

result

    # libgeotiff git commit:36e5a2b
-- The C compiler identification is MSVC 19.40.33811.0
-- The CXX compiler identification is MSVC 19.40.33811.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/sdk/softs/vs22/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/sdk/softs/vs22/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for include file strings.h
-- Looking for include file strings.h - not found
-- Generating geo_config.h header
-- Generating geo_config.h header - done
-- Found PROJ: C:/sdk/release/vs17_x64-avx2/_proj/lib/proj.lib (found version "9.4.1")
-- Found TIFF: C:/sdk/release/vs17_x64-avx2/lib/cmake/tiff (found version "4.6.0")
-- Looking for TIFFOpen
-- Looking for TIFFOpen - found
--
################################
Summary of build options:
   Build shared library:     ON
   Build man pages:          OFF
   Build doc files:          OFF
   Build GeoTIFF utilities:  OFF
   PROJ version:             9.4.1
   TIFF version:             4.6.0
   Build TOWGS84 support:    ON
################################
-- Configuring done (1.5s)
-- Generating done (0.0s)
-- Build files have been written to: C:/sdk/build/vs17_x64-avx2/libgeotiff
[1/17] Building C object CMakeFiles\geotiff_library.dir\geo_extra.c.obj
[2/17] Building C object CMakeFiles\geotiff_library.dir\geo_free.c.obj
[3/17] Building C object CMakeFiles\geotiff_library.dir\geo_print.c.obj
[4/17] Building C object CMakeFiles\geotiff_library.dir\geo_get.c.obj
[5/17] Building C object CMakeFiles\geotiff_library.dir\cpl_serv.c.obj
[6/17] Building C object CMakeFiles\geotiff_library.dir\geo_set.c.obj
[7/17] Building C object CMakeFiles\geotiff_library.dir\libxtiff\xtiff.c.obj
[8/17] Building C object CMakeFiles\geotiff_library.dir\geo_simpletags.c.obj
[9/17] Building C object CMakeFiles\geotiff_library.dir\geo_new.c.obj
[10/17] Building C object CMakeFiles\geotiff_library.dir\geo_trans.c.obj
[11/17] Building C object CMakeFiles\geotiff_library.dir\geo_tiffp.c.obj
[12/17] Building C object CMakeFiles\geotiff_library.dir\geo_write.c.obj
[13/17] Building C object CMakeFiles\geotiff_library.dir\geotiff_proj4.c.obj
[14/17] Building C object CMakeFiles\geotiff_library.dir\geo_normalize.c.obj
[15/17] Building C object CMakeFiles\geotiff_library.dir\geo_names.c.obj
[16/17] Linking C shared library bin\geotiff.dll
[16/17] Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: C:/sdk/release/vs17_x64-avx2/include/geotiff.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geotiffio.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geovalues.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geonames.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geokeys.h
-- Installing: C:/sdk/release/vs17_x64-avx2/include/geo_config.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geo_tiffp.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geo_keyp.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geo_normalize.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/cpl_serv.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geo_simpletags.h
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_datum.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_gcs.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_pm.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_units.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geo_ctrans.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_ellipse.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_pcs.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_proj.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/epsg_vertcs.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geokeys.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/geokeys_v1_1.inc
-- Up-to-date: C:/sdk/release/vs17_x64-avx2/include/xtiffio.h
-- Installing: C:/sdk/release/vs17_x64-avx2/lib/geotiff.lib
-- Installing: C:/sdk/release/vs17_x64-avx2/bin/geotiff.dll
-- Installing: C:/sdk/release/vs17_x64-avx2/bin/geotiff.pdb
-- Installing: C:/sdk/release/vs17_x64-avx2/lib/pkgconfig/libgeotiff.pc
-- Installing: C:/sdk/release/vs17_x64-avx2/cmake/geotiff-config.cmake
-- Installing: C:/sdk/release/vs17_x64-avx2/cmake/geotiff-config-version.cmake
-- Installing: C:/sdk/release/vs17_x64-avx2/cmake/geotiff-depends.cmake
-- Installing: C:/sdk/release/vs17_x64-avx2/cmake/geotiff-depends-relwithdebinfo.cmake
[version] '1.7.4' C:\sdk\release\vs17_x64-avx2\bin\geotiff.dll (C:\sdk\release\vs17_x64-avx2\include\geotiff.h)

nono303 pushed a commit to nono303/win-build-scripts that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants