[CMake] find_library/find_path not working on mingw
Karolin Varner
karo at cupdev.net
Thu Feb 26 18:28:26 EST 2015
Hi,
I am in the process of refactoring some build configuration
for windows/mingw; the application I am working on heavily
relies on find_library/find_path on linux and I am adding
that for windows too.
Neither of those functions seems to do anything when I am
compiling with mingw though. Here is what I ended up tesing with:
find_library(ZLIB_LIBRARY2 z zdll zdll.lib HINTS
"/home/karo/pr0j/inexor/code/src/platform_windows/lib/common64")
find_path(ZLIB_INCLUDE_DIR2 zlib.h PATHS
"/home/karo/pr0j/inexor/code/src/platform_windows/include/")
$ ls -l
/home/karo/pr0j/inexor/code/src/platform_windows/lib/common64/zdll.lib
/home/karo/pr0j/inexor/code/src/platform_windows/include/zlib.h
-rw-r--r-- 1 karo karo 79564 Feb 1 15:01
/home/karo/pr0j/inexor/code/src/platform_windows/include/zlib.h
-rw-r--r-- 1 karo karo 12900 Feb 26 21:31
/home/karo/pr0j/inexor/code/src/platform_windows/lib/common64/zdll.lib
Not even that works!
I've tried a couple different things before, including
setting CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH both as
variables and in the environment. I did the same with the
CMAKE_SYSTEM_* variables.
But no matter what, the variables are always being set to
ZLIB_LIBRARY2-NOTFOUND and ZLIB_INCLUDE_DIR2-NOTFOUND .
Does anybody have an idea what this could be caused by?
Thanks a lot!
Karolin Varner
More information about the CMake
mailing list