Hello folks,

I ran into an issue today and I think it is an unexpected behaviour.

I have a CMake project that build an external project (autotools) and pack
it into a .deb.
It works when I use the Makefile generator (cmake /my/path) but it does not
when I use the Ninja generator (cmake -G Ninja /my/path) -> it produces an
valid but empty package.

I expected that the behaviour would be the same regardless the generator I
use. Is that correct ?

*Here is the complete CMakeLists.txt : *

project(sqlcipher)
cmake_minimum_required (VERSION 2.8)
include(ExternalProject)

ExternalProject_Add(
    lsqlcipher
    GIT_REPOSITORY https://github.com/sqlcipher/sqlcipher.git
    BUILD_IN_SOURCE true
    CONFIGURE_COMMAND ./configure --enable-tempstore=yes
"CFLAGS=-DSQLITE_HAS_CODEC"
)

SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libssl1.0.2,libssl-dev")
SET(CPACK_DEBIAN_PACKAGE_PROVIDES "libqlcipher0, libsqlcipher-dev,
sqlcipher")
SET(CPACK_DEBIAN_PACKAGE_REPLACES ${CPACK_DEBIAN_PACKAGE_PROVIDES})
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_NAME "my-sqlcipher")
SET(CPACK_PACKAGE_VERSION "3.20.1")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Me")
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Install the last version of
sqlcipher")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "all")
SET(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
INCLUDE(CPack)

*To reproduce : *

   1. Copy the CMakeLists.txt content to a file
   2. mkdir build
   3. cd build
   4. cmake ..
   5. make package
   6. dpkg -c *.deb # => there is contents
   7. rm -rf *
   8. cmake -G Ninja ..
   9. ninja package
   10. dpkg -c *.deb # => it is empty...

Any idea of what I am doing wrong ? Or is it a bug in CMake/CPack ?

Thank you,

Alfred
-- 
Cordialement,
Alfred Sawaya
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to