Hello All I'm newer for CMake. Now I'm trying to use CMake in current project, but I met following issue CMakeLists.txt : FIND_PACKAGE(PkgConfig)PKG_CHECK_MODULES(GLIB glib-2.0)PKG_CHECK_MODULES(GTHREAD gthread-2.0)PKG_CHECK_MODULES(GOBJECT gobject-2.0) SET(GLIB_LIBS glib-2.0 gthread-2.0 gobject-2.0) EXEC_PROGRAM(pkg-config ARGS --cflags ${GLIB_LIBS} OUTPUT_VARIABLE GLIB2_CFLAGS RETURE_VALUE PKG_CONFIG_RETURE_VALUE)EXEC_PROGRAM(pkg-config ARGS --libs ${GLIB_LIBS} OUTPUT_VARIABLE GLIB2_LIBS RETURN_VALUE PKG_CONFIG_RETURE_VALUE)MESSAGE(${GLIB2_CFLAGS})MESSAGE(${GLIB2_LIBS}) INCLUDE_DIRECTORIES(AFTER GLIB_INCLUDE_DIRS)INCLUDE_DIRECTORIES(AFTER GTHREAD_INCLUDE_DIRS)INCLUDE_DIRECTORIES(AFTER GOBJECT_INCLUDE_DIRS) INCLUDE_DIRECTORIES(AFTER ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/include/message)INCLUDE_DIRECTORIES(AFTER ${GLIB2_CFLAGS}) SET(SRC_LIST main.c nmp_args.c nmp_message.c nmp_sysctl.c)ADD_EXECUTABLE(nmp-cms ${SRC_LIST})TARGET_LINK_LIBRARIES(nmp-cms ${GLIB2_LIBS}) When I execute 'CMake VERBOSE=1', I found its output was the following. How could I remove the quotation marks ? Or it's incorrect to use the pkg-config in CMakelist ? cd /home/compiler/nmp-cms/build/obj/core && /usr/bin/gcc -I/home/compiler/nmp-cms/src/core/GLIB_INCLUDE_DIRS -I/home/compiler/nmp-cms/src/core/GTHREAD_INCLUDE_DIRS -I/home/compiler/nmp-cms/src/core/GOBJECT_INCLUDE_DIRS -I/home/compiler/nmp-cms/include -I/home/compiler/nmp-cms/include/message -I"/home/compiler/nmp-cms/src/core/-pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include" -o CMakeFiles/nmp-cms.dir/main.c.o -c /home/compiler/nmp-cms/src/core/main.c/home/compiler/nmp-cms/src/core/main.c:5:18: fatal error: glib.h: No such file or directory Sean
-- 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