2011-09-26 15:12:00 +04:00
|
|
|
|
2011-02-17 02:21:45 +03:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
project(mirall)
|
2011-04-06 13:28:38 +04:00
|
|
|
set(PACKAGE "mirall")
|
2011-04-07 21:04:07 +04:00
|
|
|
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
|
2011-04-06 13:28:38 +04:00
|
|
|
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
|
2011-02-17 02:21:45 +03:00
|
|
|
|
2011-03-31 22:26:51 +04:00
|
|
|
find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml QtNetwork QtTest REQUIRED )
|
2011-04-07 21:04:07 +04:00
|
|
|
find_package(Csync)
|
|
|
|
|
|
|
|
if(CSYNC_FOUND)
|
|
|
|
add_definitions(-DWITH_CSYNC)
|
|
|
|
endif(CSYNC_FOUND)
|
2011-03-31 22:26:51 +04:00
|
|
|
|
|
|
|
macro(add_tests)
|
|
|
|
foreach( loop_var ${ARGV} )
|
|
|
|
qt4_automoc(test${loop_var}.cpp)
|
|
|
|
add_executable(test${loop_var} test${loop_var}.cpp)
|
|
|
|
target_link_libraries(test${loop_var} ${QT_LIBRARIES} mirall_static)
|
|
|
|
add_test(test${loop_var} ${CMAKE_CURRENT_BINARY_DIR}/test${loop_var} --catch_system_errors=no)
|
|
|
|
endforeach( loop_var )
|
|
|
|
endmacro(add_tests)
|
|
|
|
|
2011-04-06 13:28:38 +04:00
|
|
|
set(CPACK_SOURCE_IGNORE_FILES
|
|
|
|
# hidden files
|
|
|
|
"/\\\\..+$"
|
|
|
|
# temporary files
|
|
|
|
"\\\\.swp$"
|
|
|
|
# backup files
|
|
|
|
"~$"
|
|
|
|
# others
|
|
|
|
"\\\\.#"
|
|
|
|
"/#"
|
|
|
|
"/build/"
|
|
|
|
"/_build/"
|
|
|
|
# used before
|
|
|
|
"\\\\.o$"
|
|
|
|
"\\\\.lo$"
|
|
|
|
"\\\\.la$"
|
|
|
|
"Makefile\\\\.in$"
|
|
|
|
)
|
|
|
|
set(CPACK_PACKAGE_VENDOR "Duncan Mac-Vicar P.")
|
|
|
|
set(CPACK_GENERATOR "TBZ2")
|
|
|
|
set(CPACK_SOURCE_GENERATOR "TBZ2")
|
|
|
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE}-${VERSION}" )
|
|
|
|
include(CPack)
|
|
|
|
|
2011-03-31 22:26:51 +04:00
|
|
|
include(CTest)
|
|
|
|
enable_testing()
|
|
|
|
|
2011-02-17 02:21:45 +03:00
|
|
|
add_subdirectory(src)
|
2011-03-18 03:14:45 +03:00
|
|
|
add_subdirectory(test)
|