diff --git a/CMakeLists.txt b/CMakeLists.txt index 8260bc0..368f896 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,11 +33,17 @@ FILE( GLOB SOURCES_FILES ${SRC_DIR}/app/*.cpp ${SRC_DIR}/lib/*.cpp ) FILE( GLOB FORMS_FILES ${UI_DIR}/*.ui ) FILE( GLOB RESOURCES_FILES ${RSC_DIR}/*.qrc ) +# must go before the project command +set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) +if(DEFINED CMAKE_BUILD_TYPE AND CMAKE_VERSION VERSION_GREATER "2.8") + set_property( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} ) +endif() ###################################################################################### # Variables ###################################################################################### -# ADD_OPTION(CMAKE_BUILD_TYPE "Build type" "Release" ) +OPTION(QT_DIR "QT install dir on Windows" "" ) +ADD_OPTION(USE_QT4 "Build with QT4" OFF ) ADD_OPTION(USE_WERROR "Warnings as errors" OFF ) ADD_OPTION(USE_QT4 "Build with QT4" OFF ) ADD_OPTION(USE_OPENCV "Add OpenCV support" OFF ) diff --git a/cmake/LibQT.cmake b/cmake/LibQT.cmake index c323c2e..c3f17da 100644 --- a/cmake/LibQT.cmake +++ b/cmake/LibQT.cmake @@ -2,6 +2,10 @@ # Qt library cmake file ###################################################################################### +IF( WIN32 ) + SET (CMAKE_PREFIX_PATH ${QT_DIR} ) +ENDIF() + IF( USE_QT4 ) FIND_PACKAGE( Qt4 REQUIRED QtCore QtGui ) IF( NOT QT4_FOUND)