add cmake configuration

This commit is contained in:
wang_x1 2016-08-31 20:49:58 +02:00
parent 1f7fbcfae2
commit 316ed783a8
3 changed files with 44 additions and 0 deletions

14
CMakeLists.txt Normal file
View File

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
find_package(Qt4)
find_package(Qwt)
find_package(CBF)
find_package(Doxygen)
add_subdirectory(slsDetectorSoftware)
add_subdirectory(slsReceiverSoftware)
add_subdirectory(slsImageReconstruction)
if (QWT_FOUND)
add_subdirectory(slsDetectorGui)
endif()

11
cmake/FindCBF.cmake Normal file
View File

@ -0,0 +1,11 @@
FIND_PATH (CBF_INCLUDE_DIR
${CBF_DIR}/include
${CBF_DIR}/include/cbflib
)
FIND_LIBRARY (CBF_LIBRARY
NAMES cbf
HINTS ${CBF_DIR}/lib
)
INCLUDE ( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS (CBF DEFAULT_MSG CBF_LIBRARY CBF_INCLUDE_DIR )

19
cmake/FindQwt.cmake Normal file
View File

@ -0,0 +1,19 @@
FIND_PATH (QWT_INCLUDE_DIR
NAMES
qwt.h
HINTS
$ENV{QWTDIR}/src
/usr/include/qwt
)
FIND_LIBRARY (QWT_LIBRARY
NAMES qwt
HINTS
$ENV{QWTDIR}/lib
)
SET (QWT_LIBRARIES ${QWT_LIBRARY})
INCLUDE ( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( QWT DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIR )