Closed LuckeeDev closed 1 year ago
If you've installed the library to a sub-directory of your project, you can add it to your project's cmake file directly:
include_directories(${CMAKE_SOURCE_DIR}/modules/tmxlite/include)
link_directories(${CMAKE_SOURCE_DIR}/modelues/tmxlite/lib)
and then add it to the linker list of your executable
add_executable(foo ${FOO_SRCS})
target_link_libraries(foo tmxlite)
Thank you, that worked! And what should I do if I installed tmxlite
to a global folder?
It's not so straight forward on windows, as there aren't default library paths like on linux/unix. This Stack Overflow answer might help: https://stackoverflow.com/questions/21314893/what-is-the-default-search-path-for-find-package-in-windows-using-cmake
Thank you!
I'm trying to build a program that uses
tmxlite
on Windows. I built the library and everything seems to work fine, how can I allow CMake to find it? Here's my directory tree:I'm having troubles with both header files and library files. It can't find neither of them.