Imported Upstream version 2.99.2
[platform/upstream/libsigc++.git] / sigc++ / CMakeLists.txt
1 # Copyright 2016, The libsigc++ Development Team
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
17 set (SOURCE_FILES
18         connection.cc
19         signal_base.cc
20         signal.cc
21         trackable.cc
22         functors/slot_base.cc
23         functors/slot.cc
24 )
25
26 set (SIGCPP_LIB_NAME sigc-${SIGCXX_API_VERSION})
27
28 add_library(${SIGCPP_LIB_NAME} SHARED ${SOURCE_FILES})
29
30 set_property (TARGET ${SIGCPP_LIB_NAME} PROPERTY VERSION ${PACKAGE_VERSION})
31 set_property(TARGET ${SIGCPP_LIB_NAME}  PROPERTY SOVERSION ${LIBSIGCPP_SOVERSION})
32
33 set (INCLUDE_INSTALL_DIR "include/${PROJECT_NAME}-${SIGCXX_API_VERSION}")
34
35 install (
36         DIRECTORY "${PROJECT_SOURCE_DIR}"
37         DESTINATION "${INCLUDE_INSTALL_DIR}"
38         FILES_MATCHING PATTERN "*.h"
39 )
40
41 set (PROJECT_CMAKE_NAME ${PROJECT_NAME}-3)
42
43 install (
44     TARGETS ${SIGCPP_LIB_NAME}
45     EXPORT "${PROJECT_CMAKE_NAME}Targets"
46     LIBRARY DESTINATION "lib"
47     INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}"
48 )