[CMake] How to import platform-independent library with add_library()?
Reza Housseini
reza.housseini at gmx.ch
Fri Dec 14 05:53:13 EST 2012
On Fri, Dec 14, 2012 at 11:47 AM, Andreas Pakulat <apaku at gmx.de> wrote:
> Hi,
>
> On Fri, Dec 14, 2012 at 11:16 AM, Reza Housseini <reza.housseini at gmx.ch> wrote:
>> Hello Guys
>>
>> I try to import a library and was now wondering if there's a
>> platform-independent way?
>
> Not in the sense that CMake would handle this for you magically. At
> least not when importing libraries that are not shipping with a
> corresponding cmake file that sets this stuff up.
>
> Andreas
I found the solution, I had to use the find_library command and
specify the PATHS variable.
find_library(MYLIB mylib
PATHS ${CPPLIB_DIR}
)
Thank you anyway!
Regards
Reza
More information about the CMake
mailing list