mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
65 lines
2.3 KiB
CMake
65 lines
2.3 KiB
CMake
# set minimum cmake version
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
# set project name along with language
|
|
project(cmake-example CXX)
|
|
|
|
# copy necessary files into build directory
|
|
configure_file(phreeqc.dat phreeqc.dat COPYONLY)
|
|
configure_file(ex2 ex2 COPYONLY)
|
|
|
|
# find IPhreeqc export package
|
|
# set CMAKE_PREFIX_PATH or IPhreeqc_DIR to the
|
|
# location of the IPhreeqcConfig.cmake file
|
|
find_package(IPhreeqc REQUIRED)
|
|
|
|
# add executable target
|
|
add_executable(example main.cpp)
|
|
|
|
# set link libraries as well as include paths
|
|
#target_link_libraries(example PUBLIC IPhreeqc::IPhreeqc)
|
|
target_link_libraries(example IPhreeqc::IPhreeqc)
|
|
|
|
get_cmake_property(_variableNames VARIABLES)
|
|
list (SORT _variableNames)
|
|
foreach (_variableName ${_variableNames})
|
|
message(STATUS "${_variableName}=${${_variableName}}")
|
|
endforeach()
|
|
|
|
get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
|
|
message("inc_dirs = ${inc_dirs}")
|
|
|
|
# get_target_property(target_inc_dirs IPhreeqc::IPhreeqc INCLUDE_DIRECTORIES)
|
|
# message("target_inc_dirs = ${target_inc_dirs}")
|
|
|
|
# get_target_property(imported_location IPhreeqc::IPhreeqc IMPORTED_LOCATION)
|
|
# message("imported_location = ${imported_location}")
|
|
|
|
# get_target_property(e_target_inc_dirs example INCLUDE_DIRECTORIES)
|
|
# message("e_target_inc_dirs = ${e_target_inc_dirs}")
|
|
|
|
# get_target_property(e_imported_location example IMPORTED_LOCATION)
|
|
# message("e_imported_location = ${e_imported_location}")
|
|
|
|
get_target_property(_var IPhreeqc::IPhreeqc INTERFACE_INCLUDE_DIRECTORIES)
|
|
message("IPhreeqc.INTERFACE_INCLUDE_DIRECTORIES = ${_var}")
|
|
|
|
get_target_property(_var IPhreeqc::IPhreeqc IMPORTED_LINK_INTERFACE_LANGUAGES)
|
|
message("IPhreeqc.IMPORTED_LINK_INTERFACE_LANGUAGES = ${_var}")
|
|
|
|
get_target_property(_var IPhreeqc::IPhreeqc IMPORTED_LOCATION_RELEASE)
|
|
message("IPhreeqc.IMPORTED_LOCATION_RELEASE = ${_var}")
|
|
|
|
get_target_property(_var IPhreeqc::IPhreeqc IMPORTED_LIBNAME)
|
|
message("IPhreeqc.IMPORTED_LIBNAME = ${_var}")
|
|
|
|
get_target_property(_var IPhreeqc::IPhreeqc IMPORTED_CONFIGURATIONS)
|
|
message("IPhreeqc.IMPORTED_CONFIGURATIONS = ${_var}")
|
|
|
|
get_target_property(_var IPhreeqc::IPhreeqc LINK_INTERFACE_LIBRARIES)
|
|
message("IPhreeqc.LINK_INTERFACE_LIBRARIES = ${_var}")
|
|
|
|
get_target_property(_var IPhreeqc::IPhreeqc IMPORTED_LINK_INTERFACE_LIBRARIES)
|
|
message("IPhreeqc.IMPORTED_LINK_INTERFACE_LIBRARIES = ${_var}")
|
|
|