Beginners > Installation questions

Introducing PhreeqcRM as an external library to CMake

(1/2) > >>

Sara Tabrizi:
Hello,
I am trying to compile Phreeqcrm as an external library in a C++ environment which is configured using CMake. Although the process was straightforward by adding the library (-l) and the library path (-L) to the Makefile, it seems to be not clear to me in this environment since the external dependencies are configured using the find_package mechanism. My question is that what are the requirements to introduce phreeqcrm to CMake? I have read about adding an external package to Cmake and I have tried to use the command: -D<Package>_DIR=<path/to/package/config> for the CMake in our make file. For <Package> I used: phreeqcrm and for <path/to/package/config> I used the location of the configuration file of PhreeqcRM. After compilation of make file, for compiling the code, I still receive the error that phreeqcrm is not defined. I really appreciate if you could give me some advice about the way I am introducing phreeqcrm to CMake, that would be a big help.
Best regards,
Sara Tabrizinejadas

charlton:
Hi Sara,

It's a little complicated to explain, so let me create an example for you.

I'll let you know when it's done.

Scott Charlton

charlton:
Hi Sara,

Could you please let me know which operating system you are using?

Thanks,
Scott

Sara Tabrizi:
Hi Dear Dr.Charlton,
I am using Linux. Thank you so much for the example.
Best regards,
Sara

charlton:
Hi Sara,

I have created a github repository to demonstrate using phreeqcrm with cmake here:

https://github.com/usgs-coupled/phreeqcrm_use_cmake

Let us know if you have any questions.

Scott


Update:

I also added Modern CMake (using find_package) Instructions on the modern branch:

https://github.com/usgs-coupled/phreeqcrm_use_cmake/tree/modern

That uses our latest version of phreeqcrm at:

https://github.com/usgs-coupled/phreeqcrm  (commit 8c960d4 or newer)

Navigation

[0] Message Index

[#] Next page

Go to full version