Commit 09ef69d3 authored by Alf Gaida's avatar Alf Gaida

Cherry-picked new upstream release 3.4.1.

Move to unstable (Closes: #823947)
  And no - we will not include the plugins in the current state, no way
Introduced nomacs-l10n and added to Recommends
nomacs-l10n replaces nomacs (Closes: #836858)
  Thanks Andreas Beckmann <anbe@debian.org>
Bumped compat to 10
Bumped build dependency debhelper (>= 10)
Fixed symbols
Fixed source.lintian-overrides
Introduced new packages:
  -libnomacscore3
  -libnomacscore3-dev
  -libnomacsgui3
  -libnomacsgui3-dev
  -libnomacsloader3
  -libnomacsloader3-dev
Added Replaces for libnomacs3
Added Breaks and Replaces for libnomacs-dev
Removed quazip and libwebp from 3rd party
Fixed copyright that way
Improved rules
Bumped years in copyright
Added hardening=+all
Deleted useless manpage
parent 1dec1bb9
This diff is collapsed.
......@@ -3,9 +3,9 @@
# set your preferred Qt Library path
IF (CMAKE_CL_64)
SET(CMAKE_PREFIX_PATH "D:/Qt/qt-everywhere-opensource-src-5.5.0-x64/qtbase/bin/")
SET(CMAKE_PREFIX_PATH "D:/Qt/qt-everywhere-opensource-src-5.6.0-x64/qtbase/bin/")
ELSE ()
SET(CMAKE_PREFIX_PATH "D:/Qt/qt-everywhere-opensource-src-5.5.0-x86/qtbase/bin/")
SET(CMAKE_PREFIX_PATH "D:/Qt/qt-everywhere-opensource-src-5.6.0-x86/qtbase/bin/")
ENDIF ()
# set your preferred OpenCV Library path
......
This diff is collapsed.
/*
_____________________________________________________________________________
File Association
_____________________________________________________________________________
Based on code taken from http://nsis.sourceforge.net/File_Association
Usage in script:
1. !include "FileAssociation.nsh"
2. [Section|Function]
${FileAssociationFunction} "Param1" "Param2" "..." $var
[SectionEnd|FunctionEnd]
FileAssociationFunction=[RegisterExtension|UnRegisterExtension]
_____________________________________________________________________________
${RegisterExtension} "[executable]" "[extension]" "[description]"
"[executable]" ; executable which opens the file format
;
"[extension]" ; extension, which represents the file format to open
;
"[description]" ; description for the extension. This will be display in Windows Explorer.
;
${UnRegisterExtension} "[extension]" "[description]"
"[extension]" ; extension, which represents the file format to open
;
"[description]" ; description for the extension. This will be display in Windows Explorer.
;
_____________________________________________________________________________
Macros
_____________________________________________________________________________
Change log window verbosity (default: 3=no script)
Example:
!include "FileAssociation.nsh"
!insertmacro RegisterExtension
${FileAssociation_VERBOSE} 4 # all verbosity
!insertmacro UnRegisterExtension
${FileAssociation_VERBOSE} 3 # no script
*/
!ifndef FileAssociation_INCLUDED
!define FileAssociation_INCLUDED
!include Util.nsh
!verbose push
!verbose 3
!ifndef _FileAssociation_VERBOSE
!define _FileAssociation_VERBOSE 3
!endif
!verbose ${_FileAssociation_VERBOSE}
!define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE`
!verbose pop
!macro FileAssociation_VERBOSE _VERBOSE
!verbose push
!verbose 3
!undef _FileAssociation_VERBOSE
!define _FileAssociation_VERBOSE ${_VERBOSE}
!verbose pop
!macroend
!macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION _FILEDESCRIPTION
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Push `${_FILEDESCRIPTION}`
Push `${_DESCRIPTION}`
Push `${_EXTENSION}`
Push `${_EXECUTABLE}`
${CallArtificialFunction} RegisterExtension_
!verbose pop
!macroend
!macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Push `${_EXTENSION}`
Push `${_DESCRIPTION}`
${CallArtificialFunction} UnRegisterExtension_
!verbose pop
!macroend
!define RegisterExtension `!insertmacro RegisterExtensionCall`
!define un.RegisterExtension `!insertmacro RegisterExtensionCall`
!macro RegisterExtension
!macroend
!macro un.RegisterExtension
!macroend
!macro RegisterExtension_
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Exch $R2 ;exe
Exch
Exch $R1 ;ext
Exch
Exch 2
Exch $R0 ;desc
Exch 2
Exch 3
Exch $R3 ;file-desc
Exch 3
Push $0
Push $1
ReadRegStr $1 HKCR $R1 "" ; read current file association
StrCmp "$1" "" NoBackup ; is it empty
StrCmp "$1" "$R0" NoBackup ; is it our own
WriteRegStr HKCR $R1 "backup_val" "$1" ; backup current value
NoBackup:
WriteRegStr HKCR $R1 "" "$R0" ; set our file association with our file description
ReadRegStr $0 HKCR $R0 ""
StrCmp $0 "" 0 Skip
WriteRegStr HKCR "$R0" "" "$R3"
WriteRegStr HKCR "$R0\shell" "" "open"
WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0"
Skip:
WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$R1" "ProgID" "$R0"
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$R1\UserChoice"
Pop $1
Pop $0
Pop $R2
Pop $R1
Pop $R0
Pop $R3
!verbose pop
!macroend
!define UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
!define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
!macro UnRegisterExtension
!macroend
!macro un.UnRegisterExtension
!macroend
!macro UnRegisterExtension_
!verbose push
!verbose ${_FileAssociation_VERBOSE}
Exch $R1 ;desc
Exch
Exch $R0 ;ext
Exch
Push $0
Push $1
Push $2
ReadRegStr $1 HKCR $R0 ""
StrCmp $1 $R1 0 NoOwn ; only do this if we own it
ReadRegStr $1 HKCR $R0 "backup_val"
StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
DeleteRegKey HKCR $R0
Goto NoOwn
Restore:
WriteRegStr HKCR $R0 "" $1
DeleteRegValue HKCR $R0 "backup_val"
DeleteRegKey HKCR $R1 ;Delete key with association name settings
NoOwn:
ReadRegStr $2 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$R0\" "ProgID"
StrCmp $2 $R1 0 SkipProgID
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$R0\" "ProgID"
;DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\$R0\ProgID"
SkipProgID:
Pop $2
Pop $1
Pop $0
Pop $R1
Pop $R0
!verbose pop
!macroend
!endif # !FileAssociation_INCLUDED
\ No newline at end of file
# Update Exiv2 🍸
in order to create the msvc solution you can safely delete all projects except for:
- exiv2lib
- expat
- xmpsdk
- zlib1
- in addition, the build targets ``Release`` and ``Debug`` can be safely deleted too.
If you get an error which is similar to this:
```
DkMetaData.obj : error LNK2019: unresolved external symbol "public: static class std::auto_ptr<class Exiv2::Image> __cdecl Exiv2::ImageFactory::open(class std::basic_string<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> > const &)" (?open@ImageFactory@Exiv2@SA?AV?$auto_ptr@VImage@Exiv2@@std@ABV?$basic_string@GU?$char_traits@G@std@V?$allocator@G@2@4@Z) referenced in function "public: void __thiscall nmc::DkMetaDataT::readMetaData(class QFileInfo const &,class QSharedPointer<class QByteArray>)" (?readMetaData@DkMetaDataT@nmc@QAEXABVQFileInfo@V?$QSharedPointer@VQByteArray@@@Z)
C:\VSProjects\nomacs\build2012x86\Debug\libnomacsd.dll : fatal error LNK1120: 1 unresolved externals
```
you have to open preferences _(of the exiv2lib project) > C/C++ > Language_ and make sure that ``Treat WChar_t`` as Built in Type is set to ``No (/Z:wchar_t-)``
......@@ -34,14 +34,14 @@ Compile Instructions:
Cmake is used to build Nomacs.
you need following libraries:
- Qt > 4.7.0
- Qt > 5.2.0
- exiv2 > 0.20
if you want to enable raw images you need
- OpenCV > 0.2.1
- libraw > 0.12.0
on ubuntu you can compile nomacs with:
Get the required packages:
sudo apt-get install debhelper cdbs qt4-qmake libqt4-dev libexiv2-dev libraw-dev libopencv-dev cmake libtiff-dev git
sudo apt-get install debhelper cdbs qt5-qmake qttools5-dev-tools qt5-default qt5tools-dev libqt5svg5-dev qt5-image-formats-plugins libexiv2-dev libraw-dev libopencv-dev cmake libtiff-dev git build-essential
Checkout the code from github:
git clone https://github.com/nomacs/nomacs.git
This will by default place the source into ~/nomacs
......
# Compile Qt 4 🍸
## Compile QT with Visual Studio
see also:
- http://thomasstockx.blogspot.com/2011/03/qt-472-in-visual-studio-2010.html
- http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/
### Short version of the first link
- Install the Qt Visual Studio Add-In: http://qt.nokia.com/downloads/visual-studio-add-in
- Download qt-everywhere-opensource-src-4.x.x.zip from: http://qt-project.org/downloads
- Extract the zip
- Open a Visual Studio Command Prompt (either x86 or x64)
- dir to the qt dir
- Run
```
C:\Qt\qt-everywhere-opensource-src-4.8.5-x86-native-gestures>configure -debug-and-release -opensource -shared -no-qt3support -no-webkit -no-script -nomake examples -nomake demos -platform win32-msvc2012 -no-native-gestures
```
- Wait while Qt is getting configured for your platform.
- When done, run ``nmake`` to start compiling Qt (now it's time to take a cup of coffee/cigarette)
- rerun the nomacs cmake with the qt path
### Explanation
- ``-opensource``: install open source edition of Qt.
- ``-shared``: makes the Qt libraries shared (dll).
- ``-no-qt3support``: sorry my retro friends, don’t like old code.
- ``-qt-sql-sqlite``: enable support for the sqlite driver.
- ``-phonon``: compile the Phonon module (some multimedia thingy of Qt).
- ``-phonon-backend``: compile the platform-specific Phonon backend-plugin.
- ``-no-webkit``: disable WebKit module (heard of some bugs in combination with VS, just to be safe and since I don’t need it).
- ``-no-script``: same as no-webkit.
- ``-platform win32-msvc2012``: build for VS 2012!
- ``-no-native-gestures``: nomacs does not support qt gestures (they are a mess in Qt 4.xx) this command allows us to directly grab windows gestures which are way cleaner
- Skip reading and press “y”.
# Compile Qt 5 🍸
- here are the official qt5 compile instructions: http://qt-project.org/wiki/Building_Qt_5_from_Git
- The next steps only need to be performed if you compile from the repo
- first get the source code from: https://git.gitorious.org/qt/qt5.git
- python has to be in the system path
- open a cmd and dir to the qt5 folder. Then type
```
perl init-repository
```
- if it is complaining about git, add your git/bin and git/cmd folders to the environment variables.
- open an msvc cmd (e.g. `VS2015 x64 Native Tools Command Prompt) and type:
```
configure.bat -debug-and-release -opensource -confirm-license -qt-zlib -qt-pcre -qt-freetype -opengl dynamic -qt-sql-sqlite -no-dbus -strip -plugin-sql-sqlite -make libs -nomake tools -nomake examples -nomake tests -platform win32-msvc2015
```
- NOTE: win32-msvc2015 has to be changed according to your toolchain
- NOTE: win32-msvc2015 does not change the bitness (the CMD sets the bitness)
- after it's finished run: ``nmake``
- now it's time to have a cup of coffee
## Clean Qt5 configuration
To get a really clean tree use:
- without git: ``nmake -distclean``
- with git: ``git submodule foreach --recursive "git clean -dfx"``
since make confclean no longer works from the top-level of the repo.
see: http://qt-project.org/wiki/Building_Qt_5_from_Git#0647f0776aed243f58bfec4dd81de863
[DependencyCollector]
MAPPING_RELEASE= Release
CREATE_RELEASE = True
MAPPING_DEBUG= Debug
CREATE_DEBUG = True
MAPPING_RELWITHDEBINFO = Release
CREATE_RELWITHDEBINFO = True
MAPPING_MINSIZEREL= Release
CREATE_MINSIZEREL = True
PATHS_RELEASE = @DC_PATHS_RELEASE@
PATHS_DEBUG = @DC_PATHS_DEBUG@
BLACKLIST = KERNEL32.dll;VERSION.dll;OpenCL.dll;opengl32.dll;GDI32.dll;USER32.dll;SHELL32.dll;ole32.dll;ADVAPI32.dll;WS2_32.dll;MPR.dll;DNSAPI.dll;SHLWAPI.dll;COMDLG32.dll
This diff is collapsed.
......@@ -4,16 +4,16 @@
if(QUAZIP_INCLUDE_DIRECTORY AND QUAZIP_LIBRARIES)
set(QUAZIP_FOUND TRUE)
set(QUAZIP_FOUND TRUE)
else()
find_path(QUAZIP_INCLUDE_DIRECTORY NAMES quazip/quazip.h)
find_library(QUAZIP_LIBRARIES NAMES quazip)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QUAZIP DEFAULT_MSG QUAZIP_INCLUDE_DIRECTORY QUAZIP_LIBRARIES)
mark_as_advanced(QUAZIP_INCLUDE_DIRECTORY QUAZIP_LIBRARIES)
find_path(QUAZIP_INCLUDE_DIRECTORY NAMES quazip/quazip.h)
find_library(QUAZIP_LIBRARIES NAMES quazip)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QUAZIP DEFAULT_MSG QUAZIP_INCLUDE_DIRECTORY QUAZIP_LIBRARIES)
mark_as_advanced(QUAZIP_INCLUDE_DIRECTORY QUAZIP_LIBRARIES)
endif(QUAZIP_INCLUDE_DIRECTORY AND QUAZIP_LIBRARIES)
......@@ -5,11 +5,11 @@ if(ENABLE_PLUGINS)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "debug" OR CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "DEBUG")
message(STATUS "A debug build. -DDEBUG is defined")
add_definitions(-DDEBUG)
message(STATUS "A debug build. -DDEBUG is defined")
add_definitions(-DDEBUG)
else()
message(STATUS "A release build (non-debug). Debugging outputs are silently ignored.")
add_definitions(-DQT_NO_DEBUG_OUTPUT)
message(STATUS "A release build (non-debug). Debugging outputs are silently ignored.")
add_definitions(-DQT_NO_DEBUG_OUTPUT)
endif()
# search for pkgConfig, needed for exvi2, libraw, and older OpenCV versions
......@@ -47,7 +47,7 @@ if(ENABLE_OPENCV)
endif(OpenCV_LIBS STREQUAL "")
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV not found.")
message(FATAL_ERROR "OpenCV not found.")
else()
add_definitions(-DWITH_OPENCV)
endif()
......@@ -58,13 +58,13 @@ if(ENABLE_OPENCV)
message(STATUS "APPLE: some hacks with OpenCV libraries linking will be performed (only limited set of libs will be used)")
message(STATUS "APPLE: originals: ${OpenCV_LIBS}")
set(OpenCV_LIBS "opencv_core;opencv_imgproc")
message(STATUS "APPLE: new: ${OpenCV_LIBS}")
message(STATUS "APPLE: new: ${OpenCV_LIBS}")
message(STATUS "")
if(${OpenCV_VERSION} EQUAL "2.1.0")
add_definitions(-DDISABLE_LANCZOS)
endif()
endif(ENABLE_OPENCV)
......@@ -76,7 +76,7 @@ if(ENABLE_RAW)
pkg_check_modules(LIBRAW libraw>=0.12.0)
if(NOT LIBRAW_FOUND)
message(FATAL_ERROR "libraw not found. It's mandatory when used with ENABLE_RAW enabled")
message(FATAL_ERROR "libraw not found. It's mandatory when used with ENABLE_RAW enabled")
else()
add_definitions(-DWITH_LIBRAW)
endif()
......@@ -85,15 +85,15 @@ endif(ENABLE_RAW)
#search for multi-layer tiff
if(ENABLE_TIFF)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV is mandotory when enabling TIFF. You have to enable ENABLE_OPENCV")
endif()
find_package(TIFF)
if(TIFF_FOUND)
SET(TIFF_CONFIG_DIR "")
add_definitions(-DWITH_LIBTIFF)
else()
message(FATAL_ERROR "libtiff was not found. It's mandatory when used with ENABLE_TIFF enabled.")
endif()
message(FATAL_ERROR "OpenCV is mandotory when enabling TIFF. You have to enable ENABLE_OPENCV")
endif()
find_package(TIFF)
if(TIFF_FOUND)
SET(TIFF_CONFIG_DIR "")
add_definitions(-DWITH_LIBTIFF)
else()
message(FATAL_ERROR "libtiff was not found. It's mandatory when used with ENABLE_TIFF enabled.")
endif()
endif(ENABLE_TIFF)
#search for quazip
......@@ -103,6 +103,7 @@ unset(QUAZIP_LIBS CACHE)
unset(QUAZIP_BUILD_DIRECTORY CACHE)
unset(QUAZIP_DEPENDENCY CACHE)
unset(QUAZIP_FOUND CACHE)
unset(QUAZIP_LIBRARIES CACHE)
unset(QUAZIP_HEADERS CACHE)
unset(QUAZIP_SOURCES CACHE)
......@@ -110,60 +111,31 @@ unset(QUAZIP_MOCS CACHE)
unset(QT_ROOT CACHE)
if(ENABLE_QUAZIP)
find_package(ZLIB REQUIRED)
set(QUAZIP_INCLUDE_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/quazip-0.7/quazip")
file(GLOB QUAZIP_SOURCES "3rdparty/quazip-0.7/quazip/*.c*")
file(GLOB QUAZIP_HEADERS "3rdparty/quazip-0.7/quazip/*.h")
file(GLOB QUAZIP_MOCS "3rdparty/quazip-0.7/quazip/*.h")
QT5_WRAP_CPP(QUAZIP_MOC_SRC ${QUAZIP_MOCS})
add_definitions(-DWITH_QUAZIP)
if(USE_SYSTEM_QUAZIP)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(QuaZIP REQUIRED)
if(NOT QUAZIP_FOUND)
message(FATAL_ERROR "QUAZIP not found. It's mandatory when used with ENABLE_QUAZIP enabled, you can also disable USE_SYSTEM_QUAZIP")
else()
add_definitions(-DWITH_QUAZIP)
endif()
else()
find_package(ZLIB REQUIRED)
set(QUAZIP_INCLUDE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/quazip-0.7/quazip ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/quazip-0.7/)
file(GLOB QUAZIP_SOURCES "3rdparty/quazip-0.7/quazip/*.c" "3rdparty/quazip-0.7/quazip/*.cpp")
file(GLOB QUAZIP_HEADERS "3rdparty/quazip-0.7/quazip/*.h")
file(GLOB QUAZIP_MOCS "3rdparty/quazip-0.7/quazip/*.h")
QT5_WRAP_CPP(QUAZIP_MOC_SRC ${QUAZIP_MOCS})
add_definitions(-DWITH_QUAZIP)
endif(USE_SYSTEM_QUAZIP)
endif(ENABLE_QUAZIP)
# add libqpsd
file(GLOB LIBQPSD_SOURCES "3rdparty/libqpsd/*.cpp")
file(GLOB LIBQPSD_HEADERS "3rdparty/libqpsd/*.h")
file(GLOB LIBQPSD_MOCS "3rdparty/libqpsd/*.h")
file(GLOB LIBQPSD_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libqpsd/*.cpp")
file(GLOB LIBQPSD_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libqpsd/*.h")
file(GLOB LIBQPSD_MOCS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libqpsd/*.h")
QT5_WRAP_CPP(LIBQPSD_MOC_SRC ${LIBQPSD_MOCS})
# add webp
SET(WEBP_INCLUDEDIR "")
SET(WEBP_SOURCE "")
if(ENABLE_WEBP)
add_definitions(-DNDEBUG -DWEBP_USE_THREAD)
file(GLOB WEBP_DEC_SRCS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libwebp/src/dec/*c
)
file(GLOB WEBP_DEMUX_SRCS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libwebp/src/demux/*c
)
file(GLOB WEBP_DSP_SRCS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libwebp/src/dsp/*c
)
file(GLOB WEBP_ENC_SRCS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libwebp/src/enc/*c
)
file(GLOB WEBP_UTILS_SRCS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libwebp/src/utils/*c
)
file(GLOB WEBP_MUX_SRCS
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libwebp/src/mux/*c
)
set(WEBP_SOURCE ${WEBP_DEC_SRCS} ${WEBP_DEMUX_SRCS} ${WEBP_DSP_SRCS} ${WEBP_ENC_SRCS} ${WEBP_UTILS_SRCS} ${WEBP_MUX_SRC})
set(WEBP_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libwebp/src)
add_definitions(-DWITH_WEBP)
endif(ENABLE_WEBP)
#taken from https://cmake.org/Wiki/CMake_RPATH_handling to avoid warning
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
#creae the targets
set(BINARY_NAME ${CMAKE_PROJECT_NAME})
link_directories(${LIBRAW_LIBRARY_DIRS} ${OpenCV_LIBRARY_DIRS} ${EXIV2_LIBRARY_DIRS})
add_executable(${BINARY_NAME} WIN32 MACOSX_BUNDLE ${NOMACS_SOURCES} ${NOMACS_UI} ${NOMACS_RESOURCES} ${NOMACS_HEADERS} ${NOMACS_RC} ${NOMACS_QM} ${NOMACS_TRANSLATIONS} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS} ${WEBP_SOURCE} ${QUAZIP_SOURCES} ${ZLIB_LIBRARIES} ${NOMACS_RCC})
target_include_directories(${BINARY_NAME} PRIVATE ${OpenCV_INCLUDE_DIRS})
target_link_libraries(${BINARY_NAME} ${QT_LIBRARIES} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBS} ${VERSION_LIB} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES})
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
qt5_use_modules(${BINARY_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
# the RPATH to be used when installing
SET(CMAKE_INSTALL_RPATH "")
# don't add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
add_definitions(-DWITH_PLUGINS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
# create the targets
set(BINARY_NAME ${PROJECT_NAME})
set(DLL_CORE_NAME ${PROJECT_NAME}Core)
set(DLL_LOADER_NAME ${PROJECT_NAME}Loader)
set(DLL_NAME ${PROJECT_NAME}Gui)
#binary
link_directories(${LIBRAW_LIBRARY_DIRS} ${OpenCV_LIBRARY_DIRS} ${EXIV2_LIBRARY_DIRS} ${CMAKE_BINARY_DIR})
add_executable(${BINARY_NAME} WIN32 MACOSX_BUNDLE ${NOMACS_EXE_SOURCES} ${NOMACS_EXE_HEADERS} ${NOMACS_QM} ${NOMACS_TRANSLATIONS} ${NOMACS_RC} ${QUAZIP_SOURCES})
target_link_libraries(${BINARY_NAME} ${DLL_NAME} ${DLL_CORE_NAME} ${DLL_LOADER_NAME} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBS} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${QUAZIP_LIBRARIES} ${ZLIB_LIBRARY} ${LIBQPSD_LIBRARY})
set_target_properties(${BINARY_NAME} PROPERTIES COMPILE_FLAGS "-DDK_DLL_IMPORT -DNOMINMAX")
set_target_properties(${BINARY_NAME} PROPERTIES IMPORTED_IMPLIB "")
# add core
add_library(${DLL_CORE_NAME} SHARED ${CORE_SOURCES} ${NOMACS_UI} ${CORE_HEADERS} ${NOMACS_RCC} ${NOMACS_RC})
target_link_libraries(${DLL_CORE_NAME} ${VERSION_LIB} ${OpenCV_LIBS})
# add loader
add_library(${DLL_LOADER_NAME} SHARED ${LOADER_SOURCES} ${NOMACS_UI} ${NOMACS_RCC} ${LOADER_HEADERS} ${AUTOFLOW_RC} ${QUAZIP_SOURCES} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS})
target_link_libraries(${DLL_LOADER_NAME} ${DLL_CORE_NAME} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBS} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${QUAZIP_LIBRARIES} ${ZLIB_LIBRARY})
# add GUI
add_library(${DLL_NAME} SHARED ${GUI_SOURCES} ${NOMACS_UI} ${NOMACS_RCC} ${GUI_HEADERS} ${NOMACS_RC})
target_link_libraries(${DLL_NAME} ${DLL_CORE_NAME} ${DLL_LOADER_NAME} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBS} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${QUAZIP_LIBRARIES} ${ZLIB_LIBRARY})
add_dependencies(${DLL_LOADER_NAME} ${DLL_CORE_NAME})
add_dependencies(${DLL_NAME} ${DLL_LOADER_NAME} ${DLL_CORE_NAME})
add_dependencies(${BINARY_NAME} ${DLL_NAME} ${DLL_LOADER_NAME} ${DLL_CORE_NAME} ${QUAZIP_DEPENDENCY} ${LIBQPSD_LIBRARY})
qt5_use_modules(${BINARY_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
qt5_use_modules(${DLL_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
qt5_use_modules(${DLL_LOADER_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
qt5_use_modules(${DLL_CORE_NAME} Widgets Gui Network LinguistTools PrintSupport Concurrent Svg)
# core flags
set_target_properties(${DLL_CORE_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/libs)
set_target_properties(${DLL_CORE_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/libs)
set_target_properties(${DLL_CORE_NAME} PROPERTIES COMPILE_FLAGS "-DDK_CORE_DLL_EXPORT -DNOMINMAX")
set_target_properties(${DLL_CORE_NAME} PROPERTIES DEBUG_OUTPUT_NAME ${DLL_CORE_NAME}d)
set_target_properties(${DLL_CORE_NAME} PROPERTIES RELEASE_OUTPUT_NAME ${DLL_CORE_NAME})
# loader flags
set_target_properties(${DLL_LOADER_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/libs)
set_target_properties(${DLL_LOADER_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/libs)
set_target_properties(${DLL_LOADER_NAME} PROPERTIES COMPILE_FLAGS "-DDK_LOADER_DLL_EXPORT -DNOMINMAX")
set_target_properties(${DLL_LOADER_NAME} PROPERTIES DEBUG_OUTPUT_NAME ${DLL_LOADER_NAME}d)
set_target_properties(${DLL_LOADER_NAME} PROPERTIES RELEASE_OUTPUT_NAME ${DLL_LOADER_NAME})
# gui flags
set_target_properties(${DLL_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/libs)
set_target_properties(${DLL_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/libs)
set_target_properties(${DLL_NAME} PROPERTIES COMPILE_FLAGS "-DDK_GUI_DLL_EXPORT -DNOMINMAX")
set_target_properties(${DLL_NAME} PROPERTIES DEBUG_OUTPUT_NAME ${DLL_NAME}d)
set_target_properties(${DLL_NAME} PROPERTIES RELEASE_OUTPUT_NAME ${DLL_NAME})
target_link_libraries(${DLL_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTSVG_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTMAIN_LIBRARY} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBS} ${VERSION_LIB} ${TIFF_LIBRARIES} ${HUPNP_LIBS} ${HUPNPAV_LIBS} ${QUAZIP_LIBRARIES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")<