Commit c8b71927 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

add back dtkLog + fix cmake for export rules

parent 431bb32a
......@@ -3,9 +3,9 @@
## Author: Julien Wintz
## Created: Mon Feb 4 10:17:21 2013 (+0100)
## Version:
## Last-Updated: lun. févr. 3 11:04:16 2014 (+0100)
## By: Thibaud Kloczko
## Update #: 184
## Last-Updated: lun. févr. 3 12:40:54 2014 (+0100)
## By: Nicolas Niclausse
## Update #: 187
######################################################################
##
### Change Log:
......@@ -43,6 +43,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include("GNUInstallDirs")
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -I/usr/lib/c++/v1")
else(APPLE)
......@@ -65,6 +68,12 @@ enable_testing()
## Dependencies - Qt
## #################################################################
if(MSVC)
option(DTK_USE_PRECOMPILED_HEADERS "Use precompiled headers" true)
endif(MSVC)
include(dtkBuild)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
......
### dtkBuild.cmake ---
include (GenerateExportHeader)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type")
set(CMAKE_COLOR_MAKEFILE ON)
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY)
mark_as_advanced(CMAKE_BUILD_TYPE)
mark_as_advanced(CMAKE_INSTALL_PREFIX)
if(APPLE)
mark_as_advanced(CMAKE_OSX_ARCHITECTURES)
mark_as_advanced(CMAKE_OSX_DEPLOYMENT_TARGET)
mark_as_advanced(CMAKE_OSX_SYSROOT)
endif()
mark_as_advanced(BUILD_TESTING)
## #################################################################
## Install prefix
## #################################################################
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install" CACHE PATH "${PROJECT_NAME} install prefix" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
## #################################################################
## Configure arch
## #################################################################
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(DTK_PLATFORM_64 1)
else()
set(DTK_PLATFORM_32 1)
endif()
## #################################################################
## Configure path
## #################################################################
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/src)
include_directories(${PROJECT_BINARY_DIR})
......@@ -3,9 +3,9 @@
## Author: Julien Wintz
## Created: Mon Feb 4 10:29:13 2013 (+0100)
## Version:
## Last-Updated: lun. févr. 3 11:09:50 2014 (+0100)
## By: Thibaud Kloczko
## Update #: 85
## Last-Updated: lun. févr. 3 13:55:20 2014 (+0100)
## By: Nicolas Niclausse
## Update #: 88
######################################################################
##
### Change Log:
......@@ -14,7 +14,9 @@
add_subdirectory(dtk)
add_subdirectory(dtkCore)
# add_subdirectory(dtkCoreSupport)
add_subdirectory(dtkDistributed)
add_subdirectory(dtkLog)
add_subdirectory(dtkMath)
add_subdirectory(dtkTest)
add_subdirectory(dtkWidgets)
......
......@@ -4,9 +4,9 @@
## Copyright (C) 2008-2011 - Julien Wintz, Inria.
## Created: Thu Mar 1 14:34:49 2012 (+0100)
## Version: $Id$
## Last-Updated: mar. déc. 3 09:48:12 2013 (+0100)
## Last-Updated: lun. févr. 3 13:08:02 2014 (+0100)
## By: Nicolas Niclausse
## Update #: 37
## Update #: 41
######################################################################
##
### Commentary:
......@@ -33,11 +33,6 @@ set(${PROJECT_NAME}_HEADERS
dtkLogView.h
dtkLogView_p.h)
set(${PROJECT_NAME}_HEADERS_MOC
dtkLogModel.h
dtkLogView.h
dtkLogView_p.h)
set(${PROJECT_NAME}_SOURCES
dtkLog.cpp
dtkLogger.cpp
......@@ -50,34 +45,13 @@ set(${PROJECT_NAME}_SOURCES
## Build rules
## #################################################################
if(NOT WIN32)
add_definitions(-Wno-write-strings)
endif(NOT WIN32)
add_definitions(${QT_DEFINITIONS})
add_definitions(-DQT_SHARED)
if(NOT WIN32)
add_definitions(-DQT_NO_DEBUG)
endif(NOT WIN32)
qt4_wrap_cpp(${PROJECT_NAME}_SOURCES_MOC ${${PROJECT_NAME}_HEADERS_MOC})
if(BUILD_SHARED_LIBS)
add_library(${PROJECT_NAME} SHARED
add_library(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
${${PROJECT_NAME}_SOURCES_MOC})
)
else(BUILD_SHARED_LIBS)
add_library(${PROJECT_NAME} STATIC
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
${${PROJECT_NAME}_SOURCES_MOC})
endif(BUILD_SHARED_LIBS)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME}
${QT_LIBRARIES})
......@@ -103,13 +77,6 @@ set(${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_HEADERS}
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}Export.h")
## #################################################################
## Source file layout in development environments like Visual Studio
## #################################################################
SOURCE_GROUP("Header Files" REGULAR_EXPRESSION .*\\.h\$)
SOURCE_GROUP("Generated Files" FILES ${${PROJECT_NAME}_SOURCES_MOC})
## #################################################################
## Installation
## #################################################################
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Mar 1 14:40:12 2012 (+0100)
* Version: $Id$
* Last-Updated: Mon Mar 18 12:49:06 2013 (+0100)
* By: Julien Wintz
* Update #: 46
* Last-Updated: lun. févr. 3 13:24:35 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 48
*/
/* Commentary:
......@@ -25,5 +25,5 @@
QString DTKLOG_EXPORT dtkLogPath(QCoreApplication *application)
{
return QDir(QDesktopServices::storageLocation(QDesktopServices::DataLocation)).filePath(QString("%1.log").arg(application->applicationName()));
return QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)).filePath(QString("%1.log").arg(application->applicationName()));
}
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Mar 1 15:10:22 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Apr 4 10:00:13 2012 (+0200)
* By: tkloczko
* Update #: 49
* Last-Updated: lun. févr. 3 13:09:10 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 50
*/
/* Commentary:
......@@ -23,7 +23,7 @@
#include "dtkLogExport.h"
#include <QtCore>
#include <QtGui>
#include <QtWidgets>
class dtkLogModel;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Fri Mar 2 15:08:10 2012 (+0100)
* Version: $Id$
* Last-Updated: Mon Mar 5 14:27:11 2012 (+0100)
* By: Julien Wintz
* Update #: 9
* Last-Updated: lun. févr. 3 13:26:18 2014 (+0100)
* By: Nicolas Niclausse
* Update #: 11
*/
/* Commentary:
......@@ -22,7 +22,7 @@
#include "dtkLogExport.h"
#include <QtGui>
#include <QtWidgets>
class dtkLogViewPrivate;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment