Thanks Elke.
Find_package works perfectly. I also used find_library successfully on
my linux at work.
However, find_library fails for OS X
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.0")
-- Found include: /usr/include/libxml2
-- LIBXML2:
find_library(LIBXML2 libxml2 /usr/lib)
MESSAGE (STATUS "LIBXML2: " ${LIBML2})
if (${LIBXML2} STREQUAL "")
MESSAGE(FATAL_ERROR "Couldn't find libxml2n. Please install")
endif()
Thanks,
Sriram----- Original Message -----
From: "Rolf Eike Beer"
To:"Sriram Rajan"
Cc:
Sent:Sat, 31 Jan 2015 21:02:37 +0100
Subject:Re: [cmake-developers] CFLAGS merged during CMake process
Am Samstag, 31. Januar 2015, 18:39:03 schrieb Sriram Rajan:
> Hi Rolf,
> Thanks for forwarding this e-mail on my behalf. I figured out the
> solution.. I was using `xml2-config --cflags` for the include
files. The
> result was pre-pended with a "-I", follwed by include-path. Using
sed to
> remove this "-I" worked.
Why don't use simply use
find_package(LibXml2)
include_directories(${LIBXML2_INCLUDE_DIR})
Greetings,
Eike
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake