Re: [CMake] find_library doesn't find .dll on windows

2018-06-12 Thread Bo Zhou
Hi, This is a feature/problem on Windows, the library used for dynamic linking is not the runtime module as Linux or OSX but the .lib, a collection of symbols. I suggest you could still use find_library() to locate the .lib file for linking, then use find_file() to collect the runtime file then

Re: [CMake] find_library doesn't find .dll on windows

2018-06-11 Thread Cyril Boucher
Hi Romain, Just to give you more insight on this and add details on top of Juan's answer, CMake will only able to find libraries with the .lib extension because it is what you are supposed to link against. And CMake explicitly defines that in the following file:

Re: [CMake] find_library doesn't find .dll on windows

2018-06-05 Thread Bill Hoffman
On 6/1/2018 6:30 PM, Romain LEGUAY wrote: Thank you for your answer. I just want to find the file libmysql.dll because it's needed to be used with Qt (unless I did not understand how to use Qt's MySQL driver). For now, I just do a simple copy of this file in my build folder, but it's not a

Re: [CMake] find_library doesn't find .dll on windows

2018-06-01 Thread Romain LEGUAY
Thank you for your answer. I just want to find the file libmysql.dll because it's needed to be used with Qt (unless I did not understand how to use Qt's MySQL driver). For now, I just do a simple copy of this file in my build folder, but it's not a good method. Romain Le ven. 1 juin 2018 à

Re: [CMake] find_library doesn't find .dll on windows

2018-06-01 Thread Juan E. Sanchez
My understanding is that you are supposed to link against the .lib file, and the .dll is used at runtime. From: https://dev.mysql.com/doc/refman/5.7/en/c-api-building-clients.html You link your code with either the dynamic or static C client library. On Windows, the static library is named

[CMake] find_library doesn't find .dll on windows

2018-06-01 Thread Romain LEGUAY
Hi everyone, I try to find MYSQL dynamic library on windows. For this, I use the following command: set(_PF86 "ProgramFiles(x86)") find_library( MYSQL_LIBRARY NAME "libmysql.dll" PATHS "$ENV{PROGRAMFILES}/MySQL/*/lib" "$ENV{${_PF86}}/MySQL/*/lib" "$ENV{SYSTEMDRIVE}/MySQL/*/lib"

Re: [CMake] find_library disobeying NO_DEFAULT_PATH?

2018-04-22 Thread Andrew Brownsword
I solved this problem by discovering that found libraries are one of the things cached between runs of cmake. Deleting CMakeCache.txt solves the problem. Hopefully this serves as a warning to people having the same issue. > On Apr 21, 2018, at 7:53 PM, Andrew Brownsword >

[CMake] find_library disobeying NO_DEFAULT_PATH?

2018-04-21 Thread Andrew Brownsword
I’m using this command: find_library(LIBPQXX_LIBRARY NAMES libpqxx.a libpqxx PATHS ${LIBPQXX_DEPS_DIR}/src/src PATH_SUFFIXES .libs NO_DEFAULT_PATH) message(STATUS "libpqxx @ " ${LIBPQXX_LIBRARY}) This prints a path to where an older version is installed in

Re: [CMake] find_library fails when cross compiling

2018-03-28 Thread Oliver Dain
In case anyone else hits this, I figured it out. The issue was that our toolchain file specified "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY" which meant it was ignoring our PATH list. Changing it to "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH" solved the issue. On Mon, Mar 26, 2018 at 6:06 PM Oliver

[CMake] find_library fails when cross compiling

2018-03-26 Thread Oliver Dain
Hi, I have some find_library lines like the following: find_library(protobuf_protobuf protobuf PATHS /Users/oliverdain/Documents/code/revl/.install/${ARCH}/${VARIANT}/protobuf/3.4.1.r1/lib NO_DEFAULT_PATH ) target_link_libraries(ml_editing PUBLIC ${protobuf_protobuf}) These work find when $ARCH

Re: [CMake] find_library not finding libraries - why?

2017-11-09 Thread Cornelis Bockemühl
; Date: Thursday 9 November 2017 at 00:09 > > > > To: "cmake@cmake.org" <cmake@cmake.org> > > Subject: [CMake] find_library not finding libraries - why? > > > >   > > > In a CMakeLists.txt I have the following lines of code: > > >

[CMake] find_library returns the .dll on MinGW

2016-12-16 Thread David Demelier
Hello, I have the following files: D:/env/mingw64/lib/libzip.dll.a D:/env/mingw64/bin/libzip.dll The following environment: PATH=D:/env/mingw64/bin CMAKE_PREFIX_PATH=D:/env/mingw64 Using this: find_library( ZIP_LIBRARY NAMES zip libzip ) I got this in the CMakeCache.txt: //Path to

Re: [CMake] find_library

2016-01-14 Thread Chuck Atkins
Hi Vania, find_library(SYSC_LIB systemc PATHS "${SYSTEMC_PATH}" > PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64) > In this first call, SYSTEMC_PATH is being dereferenced as a CMake variable. This works because in your invocation of CMake: cmake -G "Unix Makefiles"

[CMake] find_library

2016-01-14 Thread Vania Joloboff
I am running cmake 3.2.2 on Linux 64 bits I run cmake with cmake -G "Unix Makefiles" -DSYSTEMC_PATH=$HOME/systemc-2.3.1/ In my CMakeLists.txt, If I put find_library(SYSC_LIB systemc PATHS "${SYSTEMC_PATH}" PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64) it works. If I

Re: [CMake] find_library

2016-01-14 Thread CHEVRIER, Marc
Defining a variable using -D option does not put this one in the environment (i.e. system environment) so using ENV will fails... On 14/01/16 10:28, "CMake on behalf of Vania Joloboff" wrote: >I am running cmake 3.2.2 on Linux

[CMake] FIND_LIBRARY & TARGET_LINK_LIBRARIES

2015-11-02 Thread Ette, Anthony (CDS)
Background info: On version 3.3.20150618. RedHawk Linux 5.1.1 (real-time variant of RHEL5). Description: I am not understanding the behavior of these two commands or am getting inconsistent results. Sometimes when the results of a found static library from FIND_LIBRARY are passed to

[CMake] find_library does not find libcurl for ios simulator

2015-05-05 Thread Jochen Issing
Hi, I am running 3.2.2 and also get the error with 3.1.0 on a mac. I have the particular curl library in a custom path. The following snippet fetches the library correctly for mac and iOS, but not for iOS-simulator. I also tried to change find_library to find_path using the real (platform

Re: [CMake] find_library while cross compiling?

2015-05-03 Thread Ben Pope
On Friday, May 01, 2015 04:34 AM, Robert Dailey wrote: I'm on Windows and I am cross compiling for Android NDK. I use find_library() with PATHS to hunt down some libssl.a files, plus a few others. However, find_library() says it can't find them. I'm assuming this is because I'm on Windows and

Re: [CMake] find_library while cross compiling?

2015-05-01 Thread Parag Chandra
Yes, you need to set them in the toolchain file - at least, that is how I did it for NaCl. Parag Chandra Senior Software Engineer, Mobile Team Mobile: +1.919.824.1410 https://ionic.com Ionic Security Inc. 1170 Peachtree St. NE STE 400, Atlanta, GA 30309 On 5/1/15, 10:29 AM, Robert

Re: [CMake] find_library while cross compiling?

2015-05-01 Thread Robert Dailey
Should I override these variables in the android toolchain file? On Thu, Apr 30, 2015 at 9:43 PM, Parag Chandra pa...@ionicsecurity.com wrote: Hi Robert, I encountered a similar problem when I was cross-compiling for NaCl on Windows. You need to set various CMake variables that explicitly

[CMake] find_library while cross compiling?

2015-04-30 Thread Robert Dailey
I'm on Windows and I am cross compiling for Android NDK. I use find_library() with PATHS to hunt down some libssl.a files, plus a few others. However, find_library() says it can't find them. I'm assuming this is because I'm on Windows and it doesn't recognize *.a files as a valid library on that

Re: [CMake] find_library while cross compiling?

2015-04-30 Thread Parag Chandra
Hi Robert, I encountered a similar problem when I was cross-compiling for NaCl on Windows. You need to set various CMake variables that explicitly override things like the library suffix/prefix. For example, in my case I needed to set the following: set (CMAKE_STATIC_LIBRARY_PREFIX lib) set

Re: [CMake] find_library/find_path not working on mingw

2015-03-02 Thread Karolin Varner
Hi Clément, hi Omar, thanks for all you're tipps! It turns out that I had CMAKE_FIND_ROOT_PATH and the PATHS as well as the HINTS are not used if they're not somewhere under CMAKE_FIND_ROOT_PATH. Since all the libs are in a common prefix, I just added that to CMAKE_FIND_ROOT_PATH. On 02/27/2015

[CMake] find_library/find_path not working on mingw

2015-02-26 Thread Karolin Varner
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

[CMake] find_library and caching

2014-06-15 Thread Lucas Soltic
Hello, I use a FindSomeLib.cmake script for my project, for which there is a variable (let's call it LINK_STATIC) to define if one wants to link against SomeLib statically. The default is to look for dynamic libraries. The issue is that when first running CMake's configure, the user may

Re: [CMake] find_library and caching

2014-06-15 Thread Nils Gladitz
On 15.06.2014 19:33, Lucas Soltic wrote: I use a FindSomeLib.cmake script for my project, for which there is a variable (let's call it LINK_STATIC) to define if one wants to link against SomeLib statically. The default is to look for dynamic libraries. The issue is that when first

Re: [CMake] find_library and caching

2014-06-15 Thread Lucas Soltic
Le 15 juin 2014 à 20:19, Nils Gladitz nilsglad...@gmail.com a écrit : On 15.06.2014 19:33, Lucas Soltic wrote: I use a FindSomeLib.cmake script for my project, for which there is a variable (let's call it LINK_STATIC) to define if one wants to link against SomeLib statically. The default

[CMake] find_library fails with local target but finds symbolic link to the same framework from ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks

2014-02-08 Thread headupinclouds
. Given the following symbolic link and iOS framework target on OS X: The following 4 lines in my CMakeLists.txt file (ADD_LOCAL_FRAMEWORK shown at bottom): lead to the following failure and success messages. Is there a workaround for this, or does the CMake find_library command only work

[CMake] find_library(): prioritize custom search path

2013-12-16 Thread Nico Schlömer
Hi all, when using find_library(...), and two versions of libX are installed, I would like to prioritize the one found it /my/custom/path/ over the one in /usr/lib/. As explained in the find_library()'s help http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:find_library, putting that

Re: [CMake] find_library(): prioritize custom search path

2013-12-16 Thread Nagger
Am 16.12.2013 14:57, schrieb Nico Schlömer: Hi all, when using find_library(...), and two versions of libX are installed, I would like to prioritize the one found it /my/custom/path/ over the one in /usr/lib/. As explained in the find_library()'s help

[CMake] find_library() and mark_as_advanced()

2013-06-18 Thread Paul Harris
Hi there, I have modified FindZLIB.cmake and FindPNG.cmake, because I want to specify a separate release and debug library for MSVC to link to. The problem is, my libraries are not in any standard place. I want to use cmake-gui, run cmake and punch in exactly where these libraries live. So I

[CMake] find_library not using CMAKE_LIBRARY_ARCHITECTURE on Windows

2013-01-22 Thread Mike
For the MSVC builds of my project, I have pre-built libraries set up with the following layout: ext/ libname/ include/ lib/ vc90/ vc100/ vc110/ libname-config.cmake libname-config-version.cmake And so on. It seemed like a good way to go, to build my own *-config

[CMake] FIND_LIBRARY using registry entries

2012-06-13 Thread Hugo Juarez Corrá
Hello Folks! I was having some troubles with FindPythonLibs, then I decided to debug it. I've found out that the CMake wasn't translating the registry string to a valid path: FIND_LIBRARY(PYTHON_LIBRARY NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} PATHS

[CMake] find_library setting search path order

2012-06-06 Thread vivek goel
I am using following command to find pcre library SET(CMAKE_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib) All compiled library are located in ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib find_library(PCRE_LIBRARY pcre PATH ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib} But

Re: [CMake] find_library setting search path order

2012-06-06 Thread Andreas Pakulat
Hi, On Wed, Jun 6, 2012 at 5:40 PM, vivek goel goelvivek2...@gmail.com wrote: I am using following command to find pcre library SET(CMAKE_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib) All compiled library are located in ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib

Re: [CMake] find_library setting search path order

2012-06-06 Thread vivek goel
sorry for typo it was path. but still it doesn't work find_library(PCRE_LIBRARY pcre HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib ) again output is /usr/lib/x86_64-linux-gnu/libpcre.so regards Vivek Goel On Wed, Jun 6, 2012 at 10:52 PM,

Re: [CMake] find_library setting search path order

2012-06-06 Thread vivek goel
regards Vivek Goel On Wed, Jun 6, 2012 at 11:05 PM, vivek goel goelvivek2...@gmail.com wrote: sorry for typo it was path. path=paths :) but still it doesn't work find_library(PCRE_LIBRARY pcre HINTS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib PATHS

Re: [CMake] find_library setting search path order

2012-06-06 Thread David Cole
Please cc the list so others may benefit from the discussion. Then you need two find_library calls. One to find it in your custom directory with NO_DEFAULT_PATH, and then if it's not there, the same call again without the NO_DEFAULT_PATH. HTH, David On Wed, Jun 6, 2012 at 2:25 PM, vivek goel

Re: [CMake] find_library setting search path order

2012-06-06 Thread vivek goel
aha. Thanks The command find_library(PCRE_LIBRARY pcre PATHS ${CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib ) is working perfectly issue was that it was reading the variable value from the cache after deleting cache it is finding library at {CMAKE_SOURCE_DIR}/lib/linux/gcc/${BIT}/lib regards Vivek

Re: [CMake] find_library search orders with CMAKE_PREFIX_PATH CMAKE_FIND_ROOT_PATH

2012-05-23 Thread Eric Noulard
2012/5/23 Nicolas Tisserand n...@manctl.com: Hi all, I am currently building a collection of inter-dependent libraries and tools, mostly cmake-built, all installed to a common staging directory. I therefore need CMake find_library find_package commands to search in the staging directory

Re: [CMake] find_library search orders with CMAKE_PREFIX_PATH CMAKE_FIND_ROOT_PATH

2012-05-23 Thread Nicolas Tisserand
On Wed, May 23, 2012 at 1:01 AM, Eric Noulard eric.noul...@gmail.com wrote: I'm not sure I understand, doesn't the -DCMAKE_FIND_ROOT_PATH:PATH=/Users/nt/Hacks/cmake-find-png/stage -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY:STRING=ONLY case gives you want you want: Yes, I forgot to clarify that

Re: [CMake] find_library search orders with CMAKE_PREFIX_PATH CMAKE_FIND_ROOT_PATH

2012-05-23 Thread David Cole
Regarding the loop swapping you ask about in your original post: I know we've discussed swapping those loops before on this list, quite to exhaustion. The bottom line is: we will not be changing those loops so as to preserve existing behavior. If we do add code to swap those loops, then it would

Re: [CMake] find_library search orders with CMAKE_PREFIX_PATH CMAKE_FIND_ROOT_PATH

2012-05-23 Thread Nicolas Tisserand
On Wed, May 23, 2012 at 11:29 AM, David Cole david.c...@kitware.com wrote: Regarding the loop swapping you ask about in your original post: I know we've discussed swapping those loops before on this list, quite to exhaustion. I'm sorry to read that... now that I raised the topic again.

[CMake] find_library in Windows

2012-04-17 Thread Vyacheslav Karamov
Hi All! I have a problem with find_library in Windows. It does find static library, but not import library. It's confusing to me. if (${CMAKE_SYSTEM_NAME} STREQUAL Windows) find_library(spinx NAMES sphinxbase ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release )

Re: [CMake] find_library in Windows

2012-04-17 Thread Vyacheslav Karamov
This code doesn't work also: if (${CMAKE_SYSTEM_NAME} STREQUAL Windows) find_library(spinx NAME sphinxbase HINTS ${CMAKE_CURRENT_SOURCE_DIR}/../../Sphinx/sphinxbase/bin/Release DOC SphinX release library ) find_library(spinx_debug NAME sphinxbased PATHS

Re: [CMake] find_library in Windows

2012-04-17 Thread Vyacheslav Karamov
When I specified full library name with extension find_library worked. But still have both debug and release versions of library being linked with my target. 17.04.2012 12:13, Vyacheslav Karamov написал: This code doesn't work also: if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)

Re: [CMake] find_library in Windows(SOLVED)

2012-04-17 Thread Vyacheslav Karamov
I'm happy. It works! target_link_libraries(${lib_name} debug ${do_scoring_debug} debug ${spinx_debug} optimized ${do_scoring} optimized ${spinx} ) 17.04.2012 14:59, Vyacheslav Karamov написал: When I specified full library name with extension find_library worked. But still have both debug and

[CMake] find_library and static library

2011-11-17 Thread Romain LEGUAY
Hello everyone! I found in previous message there is none option to specify to find_library function to search just static library. It was for CMake 2.6. Has it got any change with the new version of CMake? I try to specify the name of the library like this: find_library(MY_STATIC_LIB NAMES

Re: [CMake] find_library and static library

2011-11-17 Thread Michael Hertling
On 11/17/2011 10:28 AM, Romain LEGUAY wrote: Hello everyone! I found in previous message there is none option to specify to find_library function to search just static library. It was for CMake 2.6. Has it got any change with the new version of CMake? AFAIK, it hasn't, since the root of

[CMake] find_library finds same library over and again

2011-11-03 Thread John R. Cary
Feels like I am doing something wrong. Looking for multiple libraries: $ cat CMakeLists.txt set(mylibdir /contrib/netcdf-4.1.2-ser/lib) foreach (name netcdf_c++ netcdff netcdf) message(Looking for ${name} in ${mylibdir}.) find_library(mylib NAMES ${name} PATHS ${mylibdir} NO_DEFAULT_PATH)

Re: [CMake] find_library finds same library over and again

2011-11-03 Thread Hendrik Sattler
Am 03.11.2011 12:26, schrieb John R. Cary: Feels like I am doing something wrong. Looking for multiple libraries: $ cat CMakeLists.txt set(mylibdir /contrib/netcdf-4.1.2-ser/lib) foreach (name netcdf_c++ netcdff netcdf) message(Looking for ${name} in ${mylibdir}.) find_library(mylib NAMES

Re: [CMake] find_library finds same library over and again

2011-11-03 Thread Hendrik Sattler
Am 03.11.2011 12:42, schrieb Hendrik Sattler: Am 03.11.2011 12:26, schrieb John R. Cary: Feels like I am doing something wrong. Looking for multiple libraries: $ cat CMakeLists.txt set(mylibdir /contrib/netcdf-4.1.2-ser/lib) foreach (name netcdf_c++ netcdff netcdf) message(Looking for

[CMake] find_library with semantics of -Wl,-search_paths_first?

2011-11-03 Thread Jed Brown
The normal library search semantics on OS X are: Normally, the linker goes through each path in the search paths one at a time to find a dynamic version of the library. If none is found, it goes through each of those paths looking for a static version of the same library.

[CMake] find_library can't find dll in system32 directory

2011-06-22 Thread Stiaan Gerber
Hi all On 64-bit Windows 7 I am trying to use the find_library command to locate a 64-bit mpich2 dll in the C:/Windows/System32 directory. I use find_library (MPI_LIB fmpich2g PATHS C:/Windows/System32) This command fails to find the dll. However, if I also install 32-bit mpich2 so that

Re: [CMake] find_library can't find dll in system32 directory

2011-06-22 Thread aaron . meadows
Subject: [CMake] find_library can't find dll in system32 directory Hi all On 64-bit Windows 7 I am trying to use the find_library command to locate a 64-bit mpich2 dll in the C:/Windows/System32 directory. I use find_library (MPI_LIB fmpich2g PATHS C:/Windows/System32) This command fails to find

Re: [CMake] FIND_LIBRARY and PATH_SUFFIXES: documentation or implementation bug

2011-03-25 Thread Marcel Loose
Hi Michael, AFAICS, this is not true, see cmFindBase::AddPathSuffixes(). The paths with the additional suffixes are searched first, but the paths without the suffixes are considered, too. Look at the following CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)

[CMake] FIND_LIBRARY and PATH_SUFFIXES: documentation or implementation bug

2011-03-24 Thread Marcel Loose
Hi all, I stumbled upon this issue, while trying to track down why FindPythonLibs finds the static library libpython2.6.a in /usr/lib64/python2.6/config, instead of the shared library libpython2.6.so in /usr/lib64 on my system. The find module uses PATH_SUFFIXES python${_CURRENT_VERSION}/config,

Re: [CMake] FIND_LIBRARY and PATH_SUFFIXES: documentation or implementation bug

2011-03-24 Thread Michael Hertling
On 03/24/2011 10:55 AM, Marcel Loose wrote: Hi all, I stumbled upon this issue, while trying to track down why FindPythonLibs finds the static library libpython2.6.a in /usr/lib64/python2.6/config, instead of the shared library libpython2.6.so in /usr/lib64 on my system. On my system,

[CMake] find_library questions

2010-08-04 Thread Dennis Schridde
Hello! I have two questions concerning find_library: 1) Is it possible to retrieve the path where find_library found the library? E.g. so I can setup ..._LIBRARY_DIR correctly. 2) Is it possible to disable the lib prefix that find_library always seems to prepend when searching? I have a library

Re: [CMake] find_library questions

2010-08-04 Thread Denis Scherbakov
1) Is it possible to retrieve the path where find_library found the library? E.g. so I can setup ..._LIBRARY_DIR correctly. Yes, see GET_FILENAME_COMPONENT. 2) Is it possible to disable the lib prefix that find_library always seems to prepend when searching? I have a library that is called

Re: [CMake] find_library questions

2010-08-04 Thread Dennis Schridde
On Wednesday 04 August 2010 10:03:55 Denis Scherbakov wrote: 1) Is it possible to retrieve the path where find_library found the library? E.g. so I can setup ..._LIBRARY_DIR correctly. Yes, see GET_FILENAME_COMPONENT. 2) Is it possible to disable the lib prefix that find_library

Re: [CMake] find_library questions

2010-08-04 Thread Alexander Neundorf
On Wednesday 04 August 2010, Dennis Schridde wrote: On Wednesday 04 August 2010 10:03:55 Denis Scherbakov wrote: 1) Is it possible to retrieve the path where find_library found the library? E.g. so I can setup ..._LIBRARY_DIR correctly. Yes, see GET_FILENAME_COMPONENT. 2) Is

Re: [CMake] find_library questions

2010-08-04 Thread David Cole
find_library(THELIB NAMES thelibrary.${CMAKE_SHARED_LIBRARY_SUFFIX}) CMAKE_SHARED_LIBRARY_SUFFIX includes the . though -- so take the . out of the above line. On Wed, Aug 4, 2010 at 3:53 PM, Alexander Neundorf a.neundorf-w...@gmx.netwrote: On Wednesday 04 August 2010, Dennis Schridde

[CMake] Find_Library with Windows libs

2010-04-20 Thread Micha Renner
Hello -, I want to use Msing32-library on Windows FIND_LIBRARY(MSIMG32_LIBRARY Msimg32) If I run the cmake-gui it cannot find the library. There are no problems if cmake runs inside the visual studio. Are there some enviroment variables I have to set for the gui-version? Micha

Re: [CMake] find_library and mac os x SDKs

2010-03-29 Thread Sean McBride
On Sat, 27 Mar 2010 11:53:46 -0400, Simmons, Aaron said: It is a common misconception that one needs to use the 10.4 SDK to create an executable that is compatible with 10.4. This is not so. In most cases, you're right. Yes, I should have clarified that there are exceptions, and it looks

Re: [CMake] find_library and mac os x SDKs

2010-03-28 Thread Michael Wild
On 28. Mar, 2010, at 3:25 , Simmons, Aaron wrote: What I don't understand is this: Why do you want to force the SDK? Shouldn't this be the worry of the person doing the build? If I download some open-source software and then build it for myself, I don't want to be forced in using the

Re: [CMake] find_library and mac os x SDKs

2010-03-27 Thread Simmons, Aaron
It is a common misconception that one needs to use the 10.4 SDK to create an executable that is compatible with 10.4. This is not so. In most cases, you're right. However, we're linking to the iconv library. If we don't specify the 10.4 SDK via isysroot, it will link to the wrong version

Re: [CMake] find_library and mac os x SDKs

2010-03-27 Thread Michael Wild
On 27. Mar, 2010, at 16:53 , Simmons, Aaron wrote: It is a common misconception that one needs to use the 10.4 SDK to create an executable that is compatible with 10.4. This is not so. In most cases, you're right. However, we're linking to the iconv library. If we don't specify the

Re: [CMake] find_library and mac os x SDKs

2010-03-27 Thread Simmons, Aaron
What I don't understand is this: Why do you want to force the SDK? Shouldn't this be the worry of the person doing the build? If I download some open-source software and then build it for myself, I don't want to be forced in using the 10.4 SDK, I wan't to build against the greatest and latest!

[CMake] find_library and mac os x SDKs

2010-03-26 Thread Simmons, Aaron
When compiled on Mac OS X, my project links against the 10.4 SDK. This SDK is often not installed by default on newer systems (10.6, for example). I would like to put in a check for whether the SDK is present before compiling (otherwise the developer gets all kinds of hard-to-understand

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Sean McBride
On Fri, 26 Mar 2010 14:08:04 -0400, Simmons, Aaron said: When compiled on Mac OS X, my project links against the 10.4 SDK. This SDK is often not installed by default on newer systems (10.6, for example). I would like to put in a check for whether the SDK is present before compiling (otherwise

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Simmons, Aaron
While it will compile, the resulting binary needs to be compatible with 10.4. -Original Message- From: Sean McBride [mailto:s...@rogue-research.com] Sent: Friday, March 26, 2010 12:35 To: Simmons, Aaron; cmake@cmake.org Subject: Re: [CMake] find_library and mac os x SDKs On Fri, 26 Mar

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread David Cole
find_library finds a library. MacOSX10.4u is a directory, not a library. You just want: if(EXISTS /Developer/SDKs/MacOSX10.4u) On Fri, Mar 26, 2010 at 2:08 PM, Simmons, Aaron asimm...@rosettastone.comwrote: When compiled on Mac OS X, my project links against the 10.4 SDK. This SDK is often

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Simmons, Aaron
Actually, it's a framework. The docs say find_library will work with frameworks (which are also folders). E.g., find_library(carbon Carbon) will work. From: David Cole [mailto:david.c...@kitware.com] Sent: Friday, March 26, 2010 13:15 To: Simmons, Aaron Cc: cmake@cmake.org Subject: Re: [CMake

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Michael Jackson
., find_library(carbon Carbon) will work. From: David Cole [mailto:david.c...@kitware.com] Sent: Friday, March 26, 2010 13:15 To: Simmons, Aaron Cc: cmake@cmake.org Subject: Re: [CMake] find_library and mac os x SDKs find_library finds a library. MacOSX10.4u is a directory, not a library

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Simmons, Aaron
Probably not working because the 10.4u SDK is not is any standard location like /Library/Frameworks or /System/library/Frameworks. You may have to add the additional argument to add another search path. Actually, that doesn't work either. I think its because it has an .sdk extension and not

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Sean McBride
On Fri, 26 Mar 2010 14:38:54 -0400, Simmons, Aaron said: While it will compile, the resulting binary needs to be compatible with 10.4. It is a common misconception that one needs to use the 10.4 SDK to create an executable that is compatible with 10.4. This is not so. What you want to do is

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Clinton Stimpson
On Friday 26 March 2010 02:36:19 pm Sean McBride wrote: On Fri, 26 Mar 2010 14:38:54 -0400, Simmons, Aaron said: While it will compile, the resulting binary needs to be compatible with 10.4. It is a common misconception that one needs to use the 10.4 SDK to create an executable that is

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread David Cole
From CMake's point of view, a framework that works with find_library is a framework with the expected structure and an actual library file of the same name as the framework inside of it at the expected location. So that's why find_library does not work with the Mac SDK folders... Is there a

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread David Cole
On Fri, Mar 26, 2010 at 5:00 PM, Clinton Stimpson clin...@elemtech.comwrote: On Friday 26 March 2010 02:36:19 pm Sean McBride wrote: On Fri, 26 Mar 2010 14:38:54 -0400, Simmons, Aaron said: While it will compile, the resulting binary needs to be compatible with 10.4. It is a common

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Clinton Stimpson
On Friday 26 March 2010 04:20:41 pm David Cole wrote: On Fri, Mar 26, 2010 at 5:00 PM, Clinton Stimpson clin...@elemtech.comwrote: On Friday 26 March 2010 02:36:19 pm Sean McBride wrote: On Fri, 26 Mar 2010 14:38:54 -0400, Simmons, Aaron said: While it will compile, the resulting binary

Re: [CMake] find_library and mac os x SDKs

2010-03-26 Thread Simmons, Aaron
Is there a problem with just using if(EXISTS like I suggested in my first reply? That's what I ended up doing and it works: macro( set_osx_sysroot) if (NOT EXISTS ${ARGV0}) message(FATAL_ERROR Could not find ${ARGV0}.) endif (NOT EXISTS ${ARGV0})

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-22 Thread Marcel Loose
Hi Chuck, Whatever way you look at it, problems will likely arise sooner or later with different Boost versions. I ran into this problem because /usr/lib/libboost_date_time-mt.so was found before /home/loose/boost-1.40.0/lib/libboost_date_time.so. My point in turning the loop inside out stems

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-22 Thread Philip Lowman
On Mon, Mar 22, 2010 at 4:05 AM, Marcel Loose lo...@astron.nl wrote: Hi Chuck, Whatever way you look at it, problems will likely arise sooner or later with different Boost versions. I ran into this problem because /usr/lib/libboost_date_time-mt.so was found before

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-21 Thread Philip Lowman
On Fri, Mar 19, 2010 at 10:22 AM, Chuck Atkins chuck.atk...@kitware.com wrote: /home/myuser/projects/boost-1.41.0/lib/libboost_date_time-mt.so /home/myuser/projects/boost-1.41.0/lib/libboost_thread-mt.so /usr/local/lib/libboost_filesystem-mt.so /usr/local/lib/libboost_python-mt.so This mix

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-19 Thread Marcel Loose
Well, in my case, the library name was not even that specific. It found /usr/lib/libboost_date_time-mt.so before /home/loose/boost/boost-1.40.0/lib/libboost_date_time.so, simply because libboost_date_time-mt.so is searched for in *all* paths before libboost_date_time.so. Anyway, I still think

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-19 Thread Philip Lowman
Someone could add an option to FindBoost that will simply exclude the system paths from the search. This has never been implied by setting BOOST_ROOT. As long as the unversioned library names are being searched for with find_library they are likely going to be found. Currently the onus is on the

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-19 Thread Marcel Loose
Hi Michael, That still doesn't answer my question about turning that loop inside out. A quick grep in the CMake Modules directory showed me that there are at least a dozen other FindXXX scripts that use multiple NAMES with a FIND_XXX() commands. I haven't checked how they handle default

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-19 Thread Chuck Atkins
With multiple versions installed, setting the BOOST_ROOT variable will force the FindBoost module to search the desired location first. Turning the loop inside out wouldn't really solve the problem when multiple libraries are searched for (date_time, thread). The problem arises when multiple

[CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-18 Thread Marcel Loose
Hi all, I ran into a problem with FindBoost where it fails to find the correct version of a component library. The cause is pretty clear to me. There's a system-wide (rather old) version of Boost installed and there's my latest-greatest version of Boost. The FindBoost macro searches for a

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-18 Thread Michael Jackson
I thought there was now an option the boost build system to NOT add all the very specific naming of each library which is now the default. There is a way to turn that back on. You will have to search through the boost-build docs for that info.

Re: [CMake] FIND_LIBRARY in FindBoost finds wrong library

2010-03-18 Thread James C. Sutherland
On Mar 18, 2010, at 7:47 AM, Marcel Loose wrote: I ran into a problem with FindBoost where it fails to find the correct version of a component library. The cause is pretty clear to me. This isn't an answer to your question, but have you tried the CMake version of boost? I have found it much

Re: [CMake] Find_Library question

2010-03-04 Thread Bill Hoffman
Surya Kiran Gullapalli wrote: Hello all, I'm using Find_Library call at several places to locate libraries. The document says if Find_Library finds the library it stores the path in a cache variable, and Find_Library does not gets called again for the variable. Now If I run configure,

[CMake] Find_Library question

2010-03-03 Thread Surya Kiran Gullapalli
Hello all, I'm using Find_Library call at several places to locate libraries. The document says if Find_Library finds the library it stores the path in a cache variable, and Find_Library does not gets called again for the variable. Now If I run configure, Find_Library seems to be trying to find

[CMake] FIND_LIBRARY not using CMAKE_FIND_LIBRARY_SUFFIXES

2008-12-03 Thread Oliver Zheng
Hi, I am using Cygwin on Windows, using CMake 2.6.2. I was originally debugging FindBoost, when I narrowed the problem down to FIND_LIBRARY. This simple statement does not find the library: SET (CMAKE_FIND_LIBRARY_SUFFIXES .a) FIND_LIBRARY(NAMES test HINTS /usr/local/lib) However, this works:

[CMake] find_library feature request

2008-09-22 Thread Christopher Harvey
Hello list, I was wondering if a better way to handle failed find_library under windows would be to give the user a chance to manually find the package before giving an error. I know the user always has the chance to specify the path afterwards in the GUI, but I think that for users that are

Re: [CMake] find_library feature request

2008-09-22 Thread Bill Hoffman
Christopher Harvey wrote: Hello list, I was wondering if a better way to handle failed find_library under windows would be to give the user a chance to manually find the package before giving an error. I know the user always has the chance to specify the path afterwards in the GUI, but I

Re: [CMake] find_library first searches for static libraries

2008-07-02 Thread Nicolas Desprès
On Wed, Jul 2, 2008 at 4:25 AM, Philip Lowman [EMAIL PROTECTED] wrote: On Tue, Jul 1, 2008 at 2:37 PM, Nicolas Desprès [EMAIL PROTECTED] wrote: Hi list, I'm looking for a way to say to find_library (cmake 2.6.0) that I prefer static libraries rather than shared libraries. It seems that

[CMake] find_library first searches for static libraries

2008-07-01 Thread Nicolas Desprès
Hi list, I'm looking for a way to say to find_library (cmake 2.6.0) that I prefer static libraries rather than shared libraries. It seems that there is no option to do. The only work around I found is the following but it is not portable obviously. set(CMAKE_FIND_LIBRARY_SUFFIXES .a;.so)

RE: [CMake] FIND_LIBRARY mingw

2007-10-16 Thread Alexander.Camek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Christian, it looks like FIND_LIBRARY is using a .lib if it can't find a .a/.dll.a when using the mingw generator (see also http://lists.kde.org/?l=kde-windowsm=119248363310566w=2) Is this a intented behaviour? Normally under windows you

  1   2   >