[CMake] Small, complete CPack example?

Olaf van der Spek olafvdspek at gmail.com
Thu Aug 5 17:15:11 EDT 2010


On Thu, Aug 5, 2010 at 11:06 PM, Chris Wolf <cw10025 at gmail.com> wrote:
> I'm looking all over for an end-to-end basic example of using CPack
> to create a package with a single shared library target.  It can
> even be with the TGZ generator.

cmake_minimum_required(VERSION 2.4)
set(CMAKE_BUILD_TYPE release)
include_directories(.)
add_library(
        xbt SHARED
        sql/database.cpp
        sql/sql_query.cpp
        sql/sql_result.cpp
)
install(DIRECTORY xbt DESTINATION include FILES_MATCHING PATTERN *.h
PATTERN .svn EXCLUDE)
install(TARGETS xbt DESTINATION lib)


More information about the CMake mailing list