CMakeLists.txt
changeset 16 19d13d97b3a1
parent 15 891fc0779d50
child 18 887d772326a0
equal deleted inserted replaced
15:891fc0779d50 16:19d13d97b3a1
    14 # You should have received a copy of the GNU General Public License
    14 # You should have received a copy of the GNU General Public License
    15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
    16 
    16 
    17 cmake_minimum_required(VERSION 2.6) 
    17 cmake_minimum_required(VERSION 2.6) 
    18 project(cmd C) 
    18 project(cmd C) 
       
    19 set(PROJECT_VERSION "0.0.1")
    19 
    20 
    20 ## User settable options
    21 ## User settable options
    21  
    22  
    22 ## Check for build dependencies
    23 ## Check for build dependencies
    23 find_package(PkgConfig REQUIRED) 
    24 find_package(PkgConfig REQUIRED) 
    28 
    29 
    29 ## Target definitions
    30 ## Target definitions
    30 add_library(cmd MODULE cmd.c) 
    31 add_library(cmd MODULE cmd.c) 
    31 
    32 
    32 ## Compiler setup
    33 ## Compiler setup
       
    34 configure_file(config.h.in config.h)
    33 include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} 
    35 include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} 
    34                     ${MCABBER_INCLUDE_DIRS})
    36                     ${MCABBER_INCLUDE_DIRS})
    35 target_link_libraries(cmd ${GLIB_LIBRARIES} 
    37 target_link_libraries(cmd ${GLIB_LIBRARIES} 
    36 					  ${MCABBER_LIBRARIES})
    38 					  ${MCABBER_LIBRARIES})
    37 include_directories(${cmd_SOURCE_DIR} 
    39 include_directories(${cmd_SOURCE_DIR} 
    38                     ${cmd_BINARY_DIR})
    40                     ${cmd_BINARY_DIR})
    39 
    41 
    40 ## Packaging information
    42 ## Packaging information
    41 set(CPACK_PACKAGE_NAME libmcabber-cmd)
    43 set(CPACK_PACKAGE_NAME libmcabber-cmd)
    42 set(CPACK_PACKAGE_VERSION "0.0.1")
    44 set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    43 set(CPACK_PACKAGE_VENDOR "IsBear")
    45 set(CPACK_PACKAGE_VENDOR "IsBear")
    44 set(CPACK_PACKAGE_CONTACT "Myhailo Danylenko <isbear@ukrpost.net>")
    46 set(CPACK_PACKAGE_CONTACT "Myhailo Danylenko <isbear@ukrpost.net>")
    45 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mcabber module for sending shell commands output to others")
    47 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mcabber module for sending shell commands output to others")
    46 set(CPACK_RESOURCE_FILE_LICENSE ${cmd_SOURCE_DIR}/COPYING)
    48 set(CPACK_RESOURCE_FILE_LICENSE ${cmd_SOURCE_DIR}/COPYING)
    47 set(CPACK_SOURCE_GENERATOR TBZ2)
    49 set(CPACK_SOURCE_GENERATOR TBZ2)