I'm trying to use CMake to configure Ceres to build on my Windows machine. I have Suitesparse v4.4.4 built on my machine and have pointed to all the appropriate directories and libraries. So I believe I have SuiteSparse properly included in the configuration - but I keep getting a curious error when I configure in CMake:
Did not find SUITESPARSE_CONFIG header (optional SuiteSparse component).
Found SUITESPARSE_CONFIG library: C:/Program Files/Common Files/MSVC/SUITESPARSE/suitesparse-metis-for-windows-1.3.0/build_VS2015/install/lib64/suitesparseconfig.lib
Did not find UFCONFIG header (optional SuiteSparse component).
-- Failed to find SuiteSparse - Failed to find either: SuiteSparse_config header & library (should be present in all SuiteSparse >= v4 installs), or UFconfig header (should be present in all SuiteSparse < v4 installs).
Found METIS library: C:/Program Files/Common Files/MSVC/SUITESPARSE/suitesparse-metis-for-windows-1.3.0/build_VS2015/install/lib64/metis.lib
Found SuiteSparse: TRUE (found version "4.4.4")
-- Found SuiteSparse 4.4.4, building with SuiteSparse.
For some reason it says it can't find the SuiteSparse_CONFIG header. But there is a file called SuiteSparse_Config.h clearly located in the include folderr w/in my SuiteSparse files (that I point to in the CMake configuration). For example, I have included the entries SUITESPARSE_INCLUDE_DIR_HINTS, SUITESPARSE_INCLUDE_DIR, and SUITESPARSE_CONFIG_HEADER (which point to the PATHs and FILEPATHs on my PC where the SuiteSparse_config.h file is located):
C:/Program Files/Common Files/MSVC/SUITESPARSE/suitesparse-metis-for-windows-1.3.0/build_VS2015/install/include/suitesparse/SuiteSparse_config.h
As shown by the first quote, above, I can 'generate' the ceres-solver in CMake and open the project in Visual Studio. However, when I go to build the projects, many of them fail to build because of the inability to find the SuiteSparse config header.
Why does CMake keep saying it can't find SUITESPARSE_CONFIG header? I feel like the problem is related to how this configuration file is being identified in one of the CMakeLists.txt file (I think, in the SuiteSparse source folders). However, actual header files are not usually specified in the CMake source files. Is there some kind of edit I need to make to the CMakeLists.txt file to get it to find and use the SuiteSparse_config.h header (and source) file(s)?