CMake: Depending on Visual Studio projects -
my project depends upon library (pjsip) distributed autotools build scripts *nix , visual studio project files windows.
my project uses cmake build system. current script linux-specific: assumes pjsip has been installed prerequisite (in system-wide library location, managed package manager) , specifies target_link_libraries(pj pjnath pjlib-util)
. canonical linux software.
i make project work visual studio. what canonical windows way set dependency? should configured in global visual studio setting? or should pjsip in subdirectory, , cmake told invoke correct build system itself?
to find dependent 3rd party libraries, follow cmake guide, http://www.cmake.org/wiki/cmake:how_to_find_libraries
generally speaking, cmake prefers absolute paths. during evaluation of cmake, found not have canonical way reference dependent libraries in visual studio. message cmake should run on every developer system in order set build environment specific target station. therefore never create solution file directly cmake versioned because paths absolute. possible after modifying cmake project files after creation.
i had labored on issue many times cmake software needed approved on our developer stations before build system created.
in end, had versioned modified cmakelists.txt
files our dependent projects finds correct canonical paths locations , had caveat built (these dependent 3rd party libraries built on version changes) must have cmake installed.
Comments
Post a Comment