Issue with CLion and find_package: Generated CMake files are placed in some odd location
<p>So basically I have the following setup:</p>

<p>A small test library called <em>mylib</em> with an according CMake file. The CMake file creates all the necessary information so that another project (which is going to be my binary) can use <code>find_package</code> to add the library. The library also has a install target.</p>

<p>A small binary called <em>mybin</em> again wih according CMake file which is depended on the mylib project. Using <code>find_package</code> I can add mylib either by specifying the location of the according myLibConfig.cmake (and myLibTargets.cmake etc.) files or by executing the install target of mylib and then letting CMake find the library itself.</p>

<p>Using CMake and XCode everything works like a charm. First, I configure and build the library. Second, I configure my binary project, specify the location of the library and then build it without any problems.</p>

<p>Now I want to do the same using CLion. My problem now is that CLion puts all the generated CMake file (which usually are placed in the build folder) in some cryptic location which can't be changed in the IDE. Now, when I want to build the mybin project I have to specify this cryptic location which seems kinda odd to me (especially because you have to find out first where CLion actually places those files).</p>

<p><strong>So my question is</strong>: Is there a more convenient way to handle the described configuration? I guess this is more or less the standard use case which makes me wonder if I'm missing out on something. Being able to specify where CLion should put the generated CMake files would solve my problem I guess.</p>

<p>I know that i can install the library (using the install target) and then let CMake find it. The problem here is that CLion (to my understanding) doesn't support install targets and therefore I have to use (in my case) XCode to build and install the library first.</p>