diff --git a/CMakeLists.txt b/CMakeLists.txt index 2536508..e71963d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,8 +51,9 @@ install( ) if(UNIX) - configure_file("yaml-cpp.pc.cmake" yaml-cpp.pc @ONLY) - install(FILES yaml-cpp.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) + set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc) + configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY) + install(FILES ${PC_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) endif(UNIX) add_subdirectory (yaml-reader)