[CMake] Error in Tutorial?

Eric Noulard eric.noulard at gmail.com
Tue Sep 11 01:50:30 EDT 2012


2012/9/11 Stephen Rasku <cmake at srasku.net>:
> Hi,
>
> I'm working through the CMake 2.8.9 tutorial and I'm at step 3
> (Installing and Testing).  I think this line:
>
>     install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" DESTINATION include)
>
> should be:
>
>     install (FILES "${PROJECT_SOURCE_DIR}/TutorialConfig.h" DESTINATION include)
>
> ${PROJECT_BINARY_DIR} didn't work for me but ${PROJECT_SOURCE_DIR}
> does.  Is this an error or do I have an error somewhere else that
> caused this?

This "PROJECT_BINARY_DIR" is correct since at
step 1 (Adding a Version Number and Configured Header File), one did:

configure_file (
  "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in"
  "${PROJECT_BINARY_DIR}/TutorialConfig.h"
  )

which precisely configure the template header config file from source tree
to binary tree.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list