I'm newbie with CMake. I tested it on Linux for a program I am making. This program uses (POSIX Threads lib), so in my CMakeList, I added :
find_package(Threads)
It works on Linux distribs (Arch, Mint, Ubuntu, ...), but now, I'm trying it in Windows32 (Visual Studio 9 2008), and I get this message during generation :
-- Looking for include file pthread.h - not found
(and when I compile output project file, pthread.h is indeed not found).
On Windows, considering "C:\pthread" as my pthread directory, I defined in path :
- "C:\pthread\include" (where resides the famous "pthread.h")
- "C:\pthread\" (in the case where CMake looks for an "include" somewhere)
But I still get the same error (even after deleted cache). I know I could "manually" add Pthread in my Project, or define some constants in CMakeList.txt, but I thinks it's not the principle of CMake : I could use the SAME "CMakeList.txt" on all systems, right ? So how can I tell to CMake "Hey ! Looks here ! Pthread is in this directory !". Maybe Cmake doesn't look in PATH, but in another environment variable, but I didn't find this information.
Thank you for reading.
EDIT : I don't know if it makes a difference, but my project is a C++ project (not C)