[CMake] how to set current source directory relative to external project

Hex hex7c3 at gmail.com
Tue Jul 9 23:02:21 EDT 2019


When I use CMAKE_BINARY_DIR the problem remains. If I 

set( EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin ) in my external project
the binary is placed in build/ext1-prefix/src/ext1-build/bin/.

Wouldn't it be better to have all my binaries in a single location? Such as
build/bin/ ? The only way I see to do this is to modify the paths in my
external projects to the parent directories, as has already been suggested.
Or copying them into that location after the build.

I don't think variables are propagated from the CMake project to the
external project. 



--
Sent from: http://cmake.3232098.n2.nabble.com/


More information about the CMake mailing list