[CMake] Lnk 1104 with nmake, and the lib prefix
Philip Lowman
philip at yhbt.com
Sun Sep 20 21:07:51 EDT 2009
On Fri, Sep 18, 2009 at 6:51 PM, Alain Leblanc <aalebl at gmail.com> wrote:
>
> # Change the following to look for a particular version of boost
> # With the current options nmake will look for the mt-gd-1_39, even though
> # the mt-1_39 is there. Probably due to compiler options.
>
> set (BOOST_SUFFIX "-vc90-mt-gd-1_39")
>
> find_library(BOOST_REGEX NAMES boost_regex-mt
> boost_regex${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH})
> find_library(BOOST_FILESYSTEM NAMES boost_filesystem-mt
> boost_filesystem${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH})
> find_library(BOOST_SYSTEM NAMES boost_system-mt
> boost_system${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH})
> find_library(BOOST_DATETIME NAMES boost_date_time-mt
> boost_date_time${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH})
> find_library(BOOST_SYSTEM NAMES boost_system-mt
> boost_system${BOOST_SUFFIX} PATHS ${LIBRARIES_SEARCH_PATH})
>
> ...
>
> add_library(utility SHARED ${SRC_FILES})
> target_link_libraries(utility ${MATHSTAT} ${BOOST_LIBRARIES})
>
> where ${BOOST_LIBRARIES} is a list of all the BOOST_REGEX, etc
>
>
> Am I missing something obvious here?
>
I would double check your paths perhaps that's why it couldn't find the
boost import library?
You may also want to try out FindBoost.cmake. It handles a lot of the
details of searching for boost components like "filesystem", "system", etc.
and it works crossplatform as well.
--
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090920/60ac5e0c/attachment.htm>
More information about the CMake
mailing list