[geos-devel] CMake in Geos 3.8.1 - Change runtime install directory

Mário Rocco Pettinati mariopettinati at gmail.com
Thu Jun 25 15:56:01 PDT 2020


Good Afternoon,

My name is Mário and I'm a Terralib/TerraAmazon developer, and we use GEOS
in our opensource projects.

I have a question. I don't know if this mailing list is the best place to
ask, but If it is not someone can guide me and I can follow the right steps.

The question is related to CMake. We are building GEOS from source in
Windows 10 using VS 2017 64bits. Everything works perfectly with the
default build and installation, but we need to output the DLLs into the LIB
folder and not the BIN folder during the installation. Obviously I could
just copy the installed files to the folder LIB, but this would let the
files "lib/cmake/GEOS/geos-targets-debug.cmake" and
"lib/cmake/GEOS/geos-targets-release.cmake" pointing to DLLs files that
will not exist anymore in the BIN folder, invalidating the use of
"geos-config.cmake". This force us to create our custom "FindGEOS.cmake" to
locate GEOS in our custom paths.

Some libraries such as Proj4 and Curl allows us to define the custom the
folder to binaries using CMake tags such as: -DBINDIR:PATH=lib
or -DCMAKE_INSTALL_BINDIR:PATH=lib

When analysing the CMake for GEOS,  in the line 71 of the CMakeLists.txt
seems to explicit define the runtimes output to the BIN folder:
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

Is there any way to change the folder of the binaries? Maybe I'm doing
something wrong.

Thanks in advance for the time taken to read my issue.

Best regards to you all

Mário
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20200625/4bb87fc3/attachment.html>


More information about the geos-devel mailing list