|
@@ -1,32 +1,32 @@
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
project (ImageLabeler)
|
|
|
|
|
|
-FIND_PACKAGE(Qt4 REQUIRED)
|
|
|
-
|
|
|
+FIND_PACKAGE(Qt4 REQUIRED)
|
|
|
|
|
|
# The version number.
|
|
|
-set (ImageLabeler_VERSION_MAJOR 1)
|
|
|
-set (ImageLabeler_VERSION_MINOR 0)
|
|
|
-
|
|
|
-SET(ImageLabeler_SOURCES main.cpp functions.cpp ImageHolder.cpp ImageLabeler.cpp LineEditForm.cpp OptionsForm.cpp)
|
|
|
-SET(ImageLabeler_HEADERS ImageHolder.h ImageLabeler.h LineEditForm.h OptionsForm.h)
|
|
|
+SET (ImageLabeler_VERSION_MAJOR 1)
|
|
|
+SET (ImageLabeler_VERSION_MINOR 1)
|
|
|
+
|
|
|
+SET(ImageLabeler_SRC "${ImageLabeler_SOURCE_DIR}/src")
|
|
|
+SET(ImageLabeler_INC "${ImageLabeler_SOURCE_DIR}/include")
|
|
|
SET(ImageLabeler_FORMS ui/ImageLabeler.ui)
|
|
|
|
|
|
SET(QT_USE_QTXML TRUE)
|
|
|
|
|
|
+# recurse over files
|
|
|
+FILE(GLOB_RECURSE ImageLabeler_SOURCES ${ImageLabeler_SRC}/*.cpp)
|
|
|
+FILE(GLOB_RECURSE ImageLabeler_HEADERS ${ImageLabeler_INC}/*.h)
|
|
|
+
|
|
|
QT4_WRAP_CPP(ImageLabeler_HEADERS_MOC ${ImageLabeler_HEADERS})
|
|
|
QT4_WRAP_UI(ImageLabeler_HEADERS_FORMS ${ImageLabeler_FORMS})
|
|
|
-
|
|
|
-# add the binary tree to the search path for include files
|
|
|
-# so that we will find TutorialConfig.h
|
|
|
-#include_directories ("${PROJECT_BINARY_DIR}")
|
|
|
+
|
|
|
+INCLUDE_DIRECTORIES(${ImageLabeler_INC})
|
|
|
|
|
|
INCLUDE(${QT_USE_FILE})
|
|
|
-ADD_DEFINITIONS(${QT_DEFINITIONS})
|
|
|
+ADD_DEFINITIONS(${QT_DEFINITIONS})
|
|
|
|
|
|
# add the executable
|
|
|
-add_executable (ImageLabeler ${ImageLabeler_SOURCES} ${ImageLabeler_HEADERS_MOC} ${ImageLabeler_HEADERS_FORMS})
|
|
|
-#target_link_libraries (Tutorial ${EXTRA_LIBS})
|
|
|
+ADD_EXECUTABLE (ImageLabeler ${ImageLabeler_SOURCES} ${ImageLabeler_HEADERS_MOC} ${ImageLabeler_HEADERS_FORMS})
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
@@ -34,6 +34,4 @@ TARGET_LINK_LIBRARIES(ImageLabeler ${QT_LIBRARIES})
|
|
|
|
|
|
# add the install targets
|
|
|
install (TARGETS ImageLabeler DESTINATION bin)
|
|
|
-#install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h"
|
|
|
-# DESTINATION include)
|
|
|
|