I know that it uses the CMake buildsystem, but thats not what I meant.
In CMake you can use find_package(Name ...options...) to let cmake know that your project wants this third-party dependency. After this call, a cmake module will be called that tries to find the specified library and its headers on the current platform. this module is usually a file called FindLibraryname.cmake. CMake ships a lot of them, but for some more rarley used libraries you have to look for the module somewhere else or write it yourself and ship it with your project.
Just as an example how this looks for the SFML library:
Code:
find_package(SFML REQUIRED)
include_directories(${SFML_INCLUDE_DIR})
add_executable(test main.cpp)
target_link_libraries(test ${SFML_LIBRARY})
This searches the main module dir of cmake for FindSFML.cmake, if not found it searches the user-specified modules dir(where your project would ship own modules) and searches there. This module then searches the platform for the needed information. If it doesnt detect the library the user can still tell it manually where to look for in the configuration.
Well, and my question is, does there exist such a FindHorde3d.cmake Module?
--Marenz