<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>I'm trying to use CPACK to generate a binary installer, I can get a source installer to sort of work, but I don't need the source at all. We do out of source builds, but I have CMAKE place my libs and bins back into the source tree under a parent/project/lib and parent/project/bin directory for each project</div><div><br></div><div>Make install installs everything to parent/application/bin parent/application/lib parent/application/data </div><div><br></div><div>I have a large directory structure with multiple libraries and a single executable setup like this</div><div>parent/project/</div><div><br></div><div>My Parent CMakeLists.txt file looks like this:</div><div><br></div><div>project(parent)</div><div><br></div><div>set(COMMON_INSTALL_DIR
${PROJECT_SOURCE_DIR}/../MyProgram)</div><div>set(COMMON_LIB_INSTALLS ${COMMON_INSTALL_DIR}/lib)<br></div><div>set(COMMON_BIN_INSTALLS ${COMMON_INSTALL_DIR}/bin)<br></div><div><br></div><div>INCLUDE(CPack)</div><div><br></div><div>add_subdirectory(project1)</div><div>add_subdirectory(project2)<br></div><div>add_subdirectory(projectApp)<br></div><div><br></div><div>If I just leave it at the parent tree, then make package creates empty .tgz trees.</div><div><br></div><div>Under Project1 it looks like this</div><div>Project1/CMakeLists.txt</div><div><br></div><div>project(project1)</div><div>SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)</div><div>SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)<br></div><div>add_subdirectory(src)</div><div><br></div><div>Project1/src/CMakeLists.txt</div><div>usual stuff to get a build and</div><div><br></div><div>add_library(project1 SHARED ${PROJECT1_SOURCES})</div><div>install(TARGETS project1 LIBRARY
DESTINATION ${COMMON_LIB_INSTALLS})</div><div><br></div><div><br></div><div>If I populate the INCLUDE(CPack) across the three cmakes, then it builds a source fine, but no binary.</div><div><br></div><div>Everything else works perfect for me, make, make install, we even have testing setup under a parent/project1/test directory, it's just CPACK that is causing me some headaches.</div><div><br></div><div>So what I want from this is when I run make install it goes to the directory</div><div><br></div><div>parent/MyProgram with /lib /data /bin folders under it</div><div><br></div><div>and then I really just want CPack to package that Folder up, I can force this using SET(CPACK_INSTALLED_DIRECTORIES "${COMMON_INSTALL_DIR};MyProgram") but I was trying to figure out why the other doesn't work.</div><div><br></div><div>Thanks for your help,</div><div><br></div><div>D</div><div><br></div></div></body></html>