pure-data / pd.cmake

A CMake based build system for Pure Data libraries.
GNU General Public License v3.0
1 stars 4 forks source link

out-of-tree builds #12

Closed umlaeute closed 5 months ago

umlaeute commented 6 months ago

being able to build the same source into different flavours (defined by the build-system) is decidedly cool.

for this to work in all cases, the only directory we ever want to put stuff into is the build directory, never the source directory. that is, the following should not return anything:

cmake -B _build
make -C _build
rm -rf _build
git status --porcelain --ignored

this means, that we must never put anything into CMAKE_(CURRENT_)SOURCE_DIR, only ever use CMAKE_(CURRENT_)BINARY_DIR to write files to.

i think c1acbcde3770129a481b2e6369da92086ba4a52c tried to fix this, but got it wrong.

personally i would prefer if the default output path would just be the build directory, and not some subdir where i have to first search for the externals:

set(PD_OUTPUT_PATH ${CMAKE_CURRENT_BUILD_DIR} CACHE PATH "Path to the output of the external")
charlesneimog commented 6 months ago

This is already fixed here: https://github.com/charlesneimog/pd.cmake/commit/8c710285ae8aa282f82c758386435aeeb1dc4d4c.

Obs.: I will do my messy commits there, then I make it clear here.

umlaeute commented 6 months ago

afaics, that commit only touches a single GitHub workflow file.

I fail to see how this could possibly relate to fixing out-of-tree builds

charlesneimog commented 5 months ago

14