Horde3D
http://horde3d.org/forums/

CMake file for horde3d libary
http://horde3d.org/forums/viewtopic.php?f=1&t=849
Page 1 of 1

Author:  Marenz [ 23.07.2009, 06:23 ]
Post subject:  CMake file for horde3d libary

Hello,

I was searching for a FindHorde3d.cmake file - A CMake module that provides me with the variables to successfully use horde3d in my project, like include dirs, library dirs, libraries.

I haven’t found any sofar.

Do you know if there is such a cmake module available?

--Marenz

Author:  Volker [ 23.07.2009, 07:50 ]
Post subject:  Re: CMake file for horde3d libary

Not sure if I understood you question. There are CMakeLists.txt files for Horde3D that let you compile the library itself. After compiling it, you need the Header file(s) under Horde3D\Bindings\C++ to use it in your project. Depending on what OS and compiler you are using you then have to link against the .lib or .so file that will be placed under the Binaries directory.

Author:  Marenz [ 23.07.2009, 08:54 ]
Post subject:  Re: CMake file for horde3d libary

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

Author:  swiftcoder [ 23.07.2009, 12:22 ]
Post subject:  Re: CMake file for horde3d libary

I am afraid that no one has written such a module yet. It is a bit tricky to implement reliably, since Horde doesn't have a fixed installation location on most platforms, but if you feel like implementing it, there will probably be many happy people :)

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/