fann
fann copied to clipboard
Absolute paths
I don't like the fact that absolute paths are written to the fann-config.cmake file. This is always a problem when you copy the built libraries to another computer or even just move them to another directory. Why not just use variables?
set ( FANN_FOUND 1 )
get_filename_component(FANN_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
set ( FANN_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/fann-use.cmake" )
set ( FANN_DEFINITIONS "" )
set ( FANN_INCLUDE_DIR "${FANN_ROOT_DIR}/include" )
set ( FANN_INCLUDE_DIRS "${FANN_ROOT_DIR}/include" )
set ( FANN_LIBRARY "fann" )
set ( FANN_LIBRARIES "fann" )
set ( FANN_LIBRARY_DIRS "${FANN_ROOT_DIR}/lib" )
set ( FANN_ROOT_DIR "${FANN_ROOT_DIR}" )
set ( FANN_VERSION_STRING "2.2.0" )
set ( FANN_VERSION_MAJOR "2" )
set ( FANN_VERSION_MINOR "2" )
set ( FANN_VERSION_PATCH "0" )
Another possibility is to let CMake generate a corresponding files: https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html#exporting-targets