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
Make install installs everything to
parent/application/bin parent/application/lib parent/application/data
I have a large directory structure with multiple libraries and a single
executable setup like this
parent/project/
My Parent CMakeLists.txt file looks like this:
project(parent)
set(COMMON_INSTALL_DIR ${PROJECT_SOURCE_DIR}/../MyProgram)
set(COMMON_LIB_INSTALLS ${COMMON_INSTALL_DIR}/lib)
set(COMMON_BIN_INSTALLS ${COMMON_INSTALL_DIR}/bin)
INCLUDE(CPack)
add_subdirectory(project1)
add_subdirectory(project2)
add_subdirectory(projectApp)
If I just leave it at the parent tree, then make package creates empty .tgz
trees.
Under Project1 it looks like this
Project1/CMakeLists.txt
project(project1)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
add_subdirectory(src)
Project1/src/CMakeLists.txt
usual stuff to get a build and
add_library(project1 SHARED ${PROJECT1_SOURCES})
install(TARGETS project1 LIBRARY DESTINATION ${COMMON_LIB_INSTALLS})
If I populate the INCLUDE(CPack) across the three cmakes, then it builds a
source fine, but no binary.
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.
So what I want from this is when I run make install it goes to the directory
parent/MyProgram with /lib /data /bin folders under it
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.
Thanks for your help,
D
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake