-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake improvements (mainly for Linux and FreeBSD) #24
Conversation
I'm not a lawer, I can change it, sounds better :) Anyway I probably should add a license-header to every
I'm using
I've removed macros from sources, so it needs to add the ifdefs again. They can be compiled together w/o additional option.
Arch Linux has only KF5 (and some apps from KDE4). If KF5 is detected - copy to KF5 directory. Otherwise copy to KDE4 directory (path can differ between distros). No need to support both.
It'll fail if
FFmpeg less then 2.2.0 won't compile (e.g.
I can squash all commits before merge, so no need to change the history of PR :)
So we've got the new
I'll check this :) |
Version merge code: #define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c) so mathematically:
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 66
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 52
#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 33
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBSWSCALE_VERSION_MAJOR 2
#define LIBSWSCALE_VERSION_MINOR 5
#define LIBSWSCALE_VERSION_MICRO 102
#define LIBSWRESAMPLE_VERSION_MAJOR 0
#define LIBSWRESAMPLE_VERSION_MINOR 18
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBAVRESAMPLE_VERSION_MAJOR 1
#define LIBAVRESAMPLE_VERSION_MINOR 2
#define LIBAVRESAMPLE_VERSION_MICRO 0 |
About the KF5/KDE4: I'm afraid this will bring a big dependency tree for just one little file to install. Therefore, firstly I would like to add an option for choosing the directory. This check will just find the default one: (stop if found) search for KF5 => search for KDE4 => just set the default one (please choose). If "None" is stated by the user, we won't install it. (I'm afraid for adding dependency on the KDE big world - I prefer minimalistic system, and just for building isn't a good idea). Also about finding packages. I can continue (like now) to just use pkg-config, but I think searching (at first we will try pkg-config) is much better for porting to new OSs. The only disadvantage is some more files in the /src/cmake/modules. If won't be hard for me. Btw: I will update the list above, and make the text crossed when it answered (I won't delete it for future generations of bored developers). It will affect only the first message. |
Rename
I don't know the default path - it depends. Try this logic ($USER_SOLID_ACTIONS_PATH is a custom patch which can be added by -DCMAKE_SOMETHING='path'): if [ -z $USER_SOLID_ACTIONS_PATH ]; then #If user doesn't specify the path - try detect it
if [ -d /usr/share/solid/actions ]; then
copy to /usr/share/solid/actions
elif [ -d /usr/share/kde4/apps/solid/actions ]; then
copy to /usr/share/kde4/apps/solid/actions
elif [ -d /usr/share/apps/solid/actions ]; then
copy to /usr/share/apps/solid/actions
else
"Show in summary that this file won't be copied."
fi
else
copy to $USER_SOLID_ACTIONS_PATH
fi
It is less important. All Linux distros and FreeBSD have |
I don't know CMake syntax, but why it has condition in QMPlay2/src/cmake_uninstall.cmake.in Line 5 in 6f407c3
Or in QMPlay2/src/cmake_uninstall.cmake.in Line 20 in 6f407c3
? 😃 |
How other software handle this? Is it task for CMake or is it only task for packager? |
About the license file - most of them use the LICENSE file naming. It is also the default one in Arch and Gentoo. About the searching libs - I will put it on hold. CMake has a great potential for Windows, making building as effortless for you as possible. But for now we will focus on Linux and FreeBSD, and maybe OS X. |
|
I'll start testing :) Btw. 1d7cb19#diff-ed2c06d232f33ec5338b0720dd0e61ebR23 (file condition) |
OK!
ECM is optional, so w/o it it just do nothing, right? It tries to push it into
OK! Btw. look here #23 According to Line 31 in 0577c75
Something is wrong on FreeBSD now, cannot configure: cmake .. -DUSE_QT5=Yes CMake Error at src/gui/CMakeLists.txt:105 (install):
install TARGETS given no RUNTIME DESTINATION for executable target
"QMPlay2".
CMake Error at src/qmplay2/CMakeLists.txt:145 (install):
install TARGETS given no LIBRARY DESTINATION for shared library target
"qmplay2". |
It works, but when I use |
I rebased again because of the "CMake: Enable ProstoPleer" commit (removes your change in the appropriate commit). ECM is optional, and if it doesn't find it, it sets the default path "/usr/share/solid/actions/" by itself. It is a recommended dependency, but not required one. |
Done: 42c5d1c |
Never thought I will succeed, but I managed to add uninstall empty directories... |
maybe a one empty line before it :) |
Added LICENSE file |
I hope that the scrip doesn't remove everything 😃 |
There are checks to find if there is no content in the directory. And only if there is no file/dir/symlink/etc in it it deletes it. I can't say it is 100% error proof (I can't check on every CMake out there), but I believe every "make uninstall" is very risky. Using the package manager to uninstall is much better. |
Hmm, maybe it is better to not remove empty directories, now I've got infinite loop on FreeBSD (so I don't want to try on non-VM OS :) ) - it's too dangerous. No need to remove everything, maybe after uninstalling remove only |
Yes, but if I install something via |
Ok, now it will remove only /usr/share/qmplay2, /usr/include/qmplay2, /usr/lib/qmplay2 (those types). |
Ok :)
-- Uninstalling directory //usr/share/qmplay2/lang//
-- Uninstalling directory //usr/share/qmplay2//
-- Uninstalling directory //usr/local/lib/qmplay2/modules//
-- Uninstalling directory //usr/local/include/QMPlay2/ FreeBSD output |
About duplicate slash - this is sanity check in case DESTDIR is without slash at the end (you can guess the dangerous situation). This is a small problem that saves us errors. |
If I re-run the cmake 2.8.11 it finds MOC from Qt 5.6.1 and then it can't compile. |
Ah, sorry :) I ran now CMake version 3.5.2 using Qt4 (arch linux) - works properly. I even switched some times and rebuild - al working. Just to be sure - you have Qt4's moc? |
For error messages for modules, example for XVideo: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e9bece..31db19c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,7 +75,8 @@ OPTION(USE_PULSEAUDIO "Build with PulseAudio support" ${LIBPULSE_FOUND})
add_feature_info(PulseAudio USE_PULSEAUDIO "Build with PulseAudio support")
if(NOT DEFINED USE_XVIDEO)
- find_package(X11 QUIET)
+ find_package(X11)
+ find_package(X11_Xv)
if(X11_FOUND AND X11_Xv_FOUND)
set(DEFAULT_XVIDEO ON) But this can't find even if I think that module detection should go to |
Yes, I've got Qt4 MOC. This is about CMake 2.8.11, on 3.5.2 Qt4 works properly. Also if I tested yesterday on 2.8.11+Qt4 it worked properly on HEAD b88ae4e
Ok! |
I must check Qt4 on CMake 2.8.11 once again like yesterday. if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
if(POLICY CMP0043)
cmake_policy(SET CMP0043 NEW)
endif()
endif() can it be in done as include? |
It works properly (CMake 2.8.11 + Qt4.8.7). HEAD: b88ae4e, replaced: Looks like the |
I think if(CMAKE_VERSION VERSION_LESS "2.8.12")
set(CMAKE_CXX_FLAGS "${Qt5Core_EXECUTABLE_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}")
endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" or CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
In C++11 flag use Qt5Core for version detection (looks better) |
find_package(ALSA QUIET)
set(DEFAULT_ALSA ${ALSA_FOUND}) ALSA can be always enabled (see #22) I think that you should check for all Qt5 modules (Core, Gui, Widgets, Network). |
This should fix Qt4 and Cmake 2.8.11 problem: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e9bece..54c3675 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,8 +23,7 @@ else()
endif()
find_package(Qt5Widgets QUIET)
-find_package(Qt4 QUIET)
-if(Qt5Widgets_FOUND AND (NOT Qt4_FOUND OR NOT (Qt5Widgets_VERSION VERSION_LESS 5.6.1)))
+if(Qt5Widgets_FOUND AND (Qt5Widgets_VERSION VERSION_GREATER 5.6.0))
set(DEFAULT_QT5 ON)
else()
set(DEFAULT_QT5 OFF) Incorrect |
And for compiler flags for Qt >= 5.7.0: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e9bece..8851486 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,9 +116,11 @@ string(STRIP ${QMPLAY2_VERSION} QMPLAY2_VERSION)
if(USE_QT5)
find_package(Qt5Widgets REQUIRED)
- set(Qt5_EXECUTABLE_COMPILE_FLAGS "-fPIC ${Qt5_EXECUTABLE_COMPILE_FLAGS}")
- if(CMAKE_VERSION VERSION_LESS "3.1" AND NOT (Qt5Widgets_VERSION VERSION_LESS 5.7.0)) # cmake < 3.1 && Qt5 >= 5.7.0
- if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" or CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # gcc or clang
+ if(CMAKE_VERSION VERSION_LESS 2.8.11)
+ set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}")
+ endif()
+ if(CMAKE_VERSION VERSION_LESS 3.1 AND NOT (Qt5Widgets_VERSION VERSION_LESS 5.7.0)) # CMake < 3.1 && Qt5 >= 5.7.0
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # GCC or Clang
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
endif()
endif() BUG, should be |
Well that a lot of replies from me :)
Thank you for creating order in this work by the tasks list in the issue. This is nearly a life saver for me. :) |
Oops 😃
Ok, I've tested it - it adds properly the
Maybe switch to
Ok!
Ok (I don't know CMake) :)
Just remove the diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e9bece..d0a58f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,16 +12,6 @@ include(FeatureSummary)
find_package(PkgConfig REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/src/cmake/Modules/")
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- find_package(ALSA QUIET)
- set(DEFAULT_ALSA ${ALSA_FOUND})
-
- set(DEFAULT_PORTAUDIO OFF)
-else()
- set(DEFAULT_ALSA OFF)
- set(DEFAULT_PORTAUDIO ON)
-endif()
-
find_package(Qt5Widgets QUIET)
find_package(Qt4 QUIET)
if(Qt5Widgets_FOUND AND (NOT Qt4_FOUND OR NOT (Qt5Widgets_VERSION VERSION_LESS 5.6.1)))
@@ -30,74 +20,74 @@ else()
set(DEFAULT_QT5 OFF)
endif()
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(DEFAULT_ALSA ON)
+ set(DEFAULT_AVDEVICE ON)
+ set(DEFAULT_PORTAUDIO OFF)
+else()
+ set(DEFAULT_ALSA OFF)
+ set(DEFAULT_AVDEVICE OFF)
+ set(DEFAULT_PORTAUDIO ON)
+endif()
+
OPTION(USE_QT5 "Build with Qt5" ${DEFAULT_QT5})
add_feature_info(Qt5 USE_QT5 "Build with Qt5")
OPTION(USE_PROSTOPLEER "Build with ProstoPleer support" ON)
add_feature_info(ProstoPleer USE_PROSTOPLEER "Build with ProstoPleer support")
OPTION(USE_AVRESAMPLE "Build with support for libavresample" OFF)
add_feature_info(libavresample USE_AVRESAMPLE "Build with support for libavresample")
-
OPTION(USE_ALSA "Build with ALSA support" ${DEFAULT_ALSA})
add_feature_info(ALSA USE_ALSA "Build with ALSA support")
OPTION(USE_OPENGL "Build with OpenGL support" ON)
add_feature_info(OpenGL USE_OPENGL "Build with OpenGL support")
OPTION(USE_PORTAUDIO "Build with PortAudio support" ${DEFAULT_PORTAUDIO})
add_feature_info(PortAudio USE_PORTAUDIO "Build with PortAudio support")
-
-if(NOT DEFINED USE_TAGLIB)
- PKG_CHECK_MODULES(TAGLIB taglib QUIET)
-endif()
-OPTION(USE_TAGLIB "Build with tags editor" ${TAGLIB_FOUND})
+OPTION(USE_TAGLIB "Build with tags editor" ON)
add_feature_info(taglib USE_TAGLIB "Build with tags editor")
if(NOT DEFINED USE_AUDIOCD)
- PKG_CHECK_MODULES(LIBCD libcdio libcddb QUIET)
+ PKG_CHECK_MODULES(LIBCD libcdio libcddb)
endif()
OPTION(USE_AUDIOCD "Build with AudioCD support" ${LIBCD_FOUND})
add_feature_info(AudioCD USE_AUDIOCD "Build with AudioCD support")
if(NOT DEFINED USE_CHIPTUNE_GME)
- find_package(GME QUIET)
+ find_package(GME)
endif()
OPTION(USE_CHIPTUNE_GME "Build Chiptune with GME support" ${LIBGME_FOUND})
add_feature_info("Chiptune GME" USE_CHIPTUNE_GME "Build Chiptune with GME support")
if(NOT DEFINED LIBSIDPLAYFP_FOUND)
- PKG_CHECK_MODULES(LIBSIDPLAYFP libsidplayfp QUIET)
+ PKG_CHECK_MODULES(LIBSIDPLAYFP libsidplayfp)
endif()
OPTION(USE_CHIPTUNE_SID "Build Chiptune with SIDPLAY support" ${LIBSIDPLAYFP_FOUND})
add_feature_info("Chiptune SIDPLAY" USE_CHIPTUNE_SID "Build Chiptune with SIDPLAY support")
if(NOT DEFINED USE_PULSEAUDIO)
- PKG_CHECK_MODULES(LIBPULSE libpulse-simple QUIET)
+ PKG_CHECK_MODULES(LIBPULSE libpulse-simple)
endif()
OPTION(USE_PULSEAUDIO "Build with PulseAudio support" ${LIBPULSE_FOUND})
add_feature_info(PulseAudio USE_PULSEAUDIO "Build with PulseAudio support")
if(NOT DEFINED USE_XVIDEO)
- find_package(X11 QUIET)
- if(X11_FOUND AND X11_Xv_FOUND)
- set(DEFAULT_XVIDEO ON)
- else()
- set(DEFAULT_XVIDEO OFF)
- endif()
+ PKG_CHECK_MODULES(PC_XVIDEO x11 xv)
endif()
-OPTION(USE_XVIDEO "Build with XVideo support" ${DEFAULT_XVIDEO})
+OPTION(USE_XVIDEO "Build with XVideo support" ${PC_XVIDEO_FOUND})
add_feature_info(XVideo USE_XVIDEO "Build with XVideo support")
if(NOT DEFINED USE_FFMPEG_VAAPI)
- PKG_CHECK_MODULES(LIBS_VAAPI libva libva-x11 QUIET)
+ PKG_CHECK_MODULES(LIBS_VAAPI libva libva-x11)
endif()
OPTION(USE_FFMPEG_VAAPI "Build VAAPI acceleration into FFmpeg" ${LIBS_VAAPI_FOUND})
add_feature_info(VAAPI USE_FFMPEG_VAAPI "Build VAAPI acceleration into FFmpeg")
if(NOT DEFINED USE_FFMPEG_VDPAU)
- PKG_CHECK_MODULES(LIBS_VDPAU vdpau x11 QUIET)
+ PKG_CHECK_MODULES(LIBS_VDPAU vdpau x11)
endif()
OPTION(USE_FFMPEG_VDPAU "Build VDPAU acceleration into FFmpeg" ${LIBS_VDPAU_FOUND})
add_feature_info(VDPAU USE_FFMPEG_VDPAU "Build VDPAU acceleration into FFmpeg")
-OPTION(USE_FFMPEG_AVDEVICE "Build FFmpeg with libavdevice suport" ON)
+OPTION(USE_FFMPEG_AVDEVICE "Build FFmpeg with libavdevice suport" ${DEFAULT_AVDEVICE})
add_feature_info(libavdevice USE_FFMPEG_AVDEVICE "Build FFmpeg with libavdevice suport")
set(LANGUAGES "All" CACHE STRING "A space-seperated list of translations to compile in to QMPlay2, \"None\", or \"All\".")
@@ -122,6 +112,9 @@ if(USE_QT5)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
endif()
endif()
+ if(USE_QT5 AND Qt5Widgets_VERSION VERSION_LESS 5.6.1)
+ message(AUTHOR_WARNING "Qt5 >= 5.6.1 is recommended for stable usage")
+ endif()
else()
find_package(Qt4 REQUIRED)
include("${QT_USE_FILE}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 05c3c3a..1513f60 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,10 +3,6 @@ cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-if(USE_QT5 AND Qt5Widgets_VERSION LESS 5.6.1)
- message(AUTHOR_WARNING "Qt5 >= 5.6.1 is recommended for stable usage")
-endif()
-
add_subdirectory(gui)
add_subdirectory(qmplay2)
add_subdirectory(modules)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 58c6535..8b73d07 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -130,7 +130,7 @@ if(INSTALL_PATH_SOLID_ACTION AND NOT INSTALL_PATH_SOLID_ACTION STREQUAL "None")
if(LOCAL_INSTALL_PATH_SOLID_ACTION)
install(FILES Unix/solid-actions/QMPlay2-opencda.desktop DESTINATION "${LOCAL_INSTALL_PATH_SOLID_ACTION}")
else()
- message(AUTHOR_WARNING "No path found for solid actions - won't be installed")
+ message(WARNING "No path found for solid actions - won't be installed")
endif()
endif() |
What about this (fixes CMake 2.8.11 and Qt4): diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e9bece..330dfa6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,11 +23,15 @@ else()
endif()
find_package(Qt5Widgets QUIET)
-find_package(Qt4 QUIET)
-if(Qt5Widgets_FOUND AND (NOT Qt4_FOUND OR NOT (Qt5Widgets_VERSION VERSION_LESS 5.6.1)))
+if(Qt5Widgets_FOUND AND (Qt5Widgets_VERSION VERSION_GREATER 5.6.0))
set(DEFAULT_QT5 ON)
else()
- set(DEFAULT_QT5 OFF)
+ find_package(Qt4 QUIET)
+ if(NOT Qt4_FOUND AND Qt5Widgets_FOUND)
+ set(DEFAULT_QT5 ON)
+ else()
+ set(DEFAULT_QT5 OFF)
+ endif()
endif()
OPTION(USE_QT5 "Build with Qt5" ${DEFAULT_QT5})
@@ -115,7 +119,9 @@ execute_process(
string(STRIP ${QMPLAY2_VERSION} QMPLAY2_VERSION)
if(USE_QT5)
- find_package(Qt5Widgets REQUIRED)
+ if(NOT Qt5Widgets_FOUND)
+ find_package(Qt5Widgets REQUIRED)
+ endif()
set(Qt5_EXECUTABLE_COMPILE_FLAGS "-fPIC ${Qt5_EXECUTABLE_COMPILE_FLAGS}")
if(CMAKE_VERSION VERSION_LESS "3.1" AND NOT (Qt5Widgets_VERSION VERSION_LESS 5.7.0)) # cmake < 3.1 && Qt5 >= 5.7.0
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" or CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # gcc or clang
@@ -123,7 +129,9 @@ if(USE_QT5)
endif()
endif()
else()
- find_package(Qt4 REQUIRED)
+ if(NOT Qt4_FOUND)
+ find_package(Qt4 REQUIRED)
+ endif()
include("${QT_USE_FILE}")
add_definitions(${QT_DEFINITIONS})
endif() ? |
Ok! |
applied your patches. |
Ok!
I think that's all for this PR :) |
I don't know about GLES in Qt4, let's handle it later. Maybe I can handle it in C++? |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21e35bf..e50d2f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,16 +12,18 @@ include(FeatureSummary)
find_package(PkgConfig REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/src/cmake/Modules/")
-find_package(Qt5Widgets QUIET)
-if(Qt5Widgets_FOUND AND (Qt5Widgets_VERSION VERSION_GREATER 5.6.0))
- set(DEFAULT_QT5 ON)
-else()
- find_package(Qt4 QUIET)
- if(NOT Qt4_FOUND AND Qt5Widgets_FOUND)
- set(DEFAULT_QT5 ON)
- else()
- set(DEFAULT_QT5 OFF)
- endif()
+if(NOT DEFINED USE_QT5 OR USE_QT5)
+ find_package(Qt5Widgets QUIET)
+ if(Qt5Widgets_FOUND AND (Qt5Widgets_VERSION VERSION_GREATER 5.6.0))
+ set(DEFAULT_QT5 ON)
+ else()
+ find_package(Qt4 QUIET)
+ if(NOT Qt4_FOUND AND Qt5Widgets_FOUND)
+ set(DEFAULT_QT5 ON)
+ else()
+ set(DEFAULT_QT5 OFF)
+ endif()
+ endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
@@ -47,7 +49,7 @@ add_feature_info(OpenGL USE_OPENGL "Build with OpenGL support")
OPTION(USE_PORTAUDIO "Build with PortAudio support" ${DEFAULT_PORTAUDIO})
add_feature_info(PortAudio USE_PORTAUDIO "Build with PortAudio support")
OPTION(USE_TAGLIB "Build with tags editor" ON)
-add_feature_info(taglib USE_TAGLIB "Build with tags editor")
+add_feature_info(TagLib USE_TAGLIB "Build with tags editor")
if(NOT DEFINED USE_AUDIOCD)
PKG_CHECK_MODULES(LIBCD libcdio libcddb)
@@ -112,7 +114,7 @@ if(USE_QT5)
if(NOT Qt5Widgets_FOUND)
find_package(Qt5Widgets REQUIRED)
endif()
- if(CMAKE_VERSION VERSION_LESS 2.8.11)
+ if(CMAKE_VERSION VERSION_LESS 2.8.12)
set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}")
endif()
if(CMAKE_VERSION VERSION_LESS 3.1 AND NOT (Qt5Widgets_VERSION VERSION_LESS 5.7.0)) # CMake < 3.1 && Qt5 >= 5.7.0
@@ -120,7 +122,7 @@ if(USE_QT5)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
endif()
endif()
- if(USE_QT5 AND Qt5Widgets_VERSION VERSION_LESS 5.6.1)
+ if(Qt5Widgets_VERSION VERSION_LESS 5.6.1)
message(AUTHOR_WARNING "Qt5 >= 5.6.1 is recommended for stable usage")
endif()
else()
diff --git a/src/cmake/Uninstall.cmake.in b/src/cmake/Uninstall.cmake.in
index 6a21782..3b5357e 100644
--- a/src/cmake/Uninstall.cmake.in
+++ b/src/cmake/Uninstall.cmake.in
@@ -8,6 +8,7 @@ set(DIRS_CLEAN
"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/QMPlay2/"
"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATAROOTDIR@/qmplay2/lang/"
"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATAROOTDIR@/qmplay2/"
+ "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DOCDIR@"
"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/qmplay2/modules/"
"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/qmplay2/"
)
@@ -30,11 +31,6 @@ foreach(file ${files})
endif()
endforeach()
-message("")
-
-list(SORT DIRS_CLEAN)
-list(REVERSE DIRS_CLEAN)
-
foreach(dir ${DIRS_CLEAN})
file(GLOB DIR_LIST "$ENV{DESTDIR}${dir}/*")
list(LENGTH DIR_LIST DIR_LIST_LEN)
diff --git a/src/modules/OpenGL2/CMakeLists.txt b/src/modules/OpenGL2/CMakeLists.txt
index 1a84d14..da0c342 100644
--- a/src/modules/OpenGL2/CMakeLists.txt
+++ b/src/modules/OpenGL2/CMakeLists.txt
@@ -32,7 +32,7 @@ if(NOT USE_QT5 OR Qt5Widgets_VERSION LESS 5.6.0)
list(APPEND OpenGL2_HDR OpenGL2OldWidget.hpp)
list(APPEND OpenGL2_SRC OpenGL2OldWidget.cpp)
- if(NOT Qt5Gui_OPENGL_IMPLEMENTATION STREQUAL GLESv2)
+ if(NOT Qt5Gui_OPENGL_IMPLEMENTATION STREQUAL GLESv2) #FIXME (see OpenGL2.pro)
add_definitions(-DVSYNC_SETTINGS)
endif()
else()
@@ -41,7 +41,7 @@ else()
list(APPEND OpenGL2_SRC OpenGL2Window.cpp OpenGL2Widget.cpp OpenGL2CommonQt5.cpp)
endif()
-if((USE_QT5 AND Qt5Gui_OPENGL_IMPLEMENTATION STREQUAL GLESv2))
+if(USE_QT5 AND (Qt5Gui_OPENGL_IMPLEMENTATION STREQUAL GLESv2))
add_definitions(-DOPENGL_ES2)
endif()
This should be enough, please review, fix (if necessary) and apply. Then I'll merge it :) |
Hmm, what will happen if I push a commit here...? |
Oops... revert... |
Maybe revert history??? |
It is merged, maybe just squash them and force push with a nice commit message? |
OK! |
I though than I can push a next commit to this PR... 😢 Is it possible? |
The problem is that git supports it. Not github, I think. |
* fallback to Qt4 if no Qt5 or Qt5 < 5.6.1 * fix finding libgme without pkg-config * detect missing libs and disable options * fix FreeBSD man install location * set FFmpeg minimal version as 2.2.0 * remove Qt5X11Extras dependency * link with x11 when using VDPAU * added ProstoPleer option * install solid actions * print summary of options * support remove qmplay2's unique directories on uninstall * install LICENSE, README.md, TODO and ChangeLog * support CMake >= 2.8.11 PR #24 #27 Task #22
continue of issue #22 and PR #21
As of the previous PR, I will add future commits as we resolve, and at the end squash everything and you will add it into the project (without merge commit).
I added a new CMake module for finding GME, and it will even search the library and headers, thus increasing the chances to find it.
Now it should be installing to $PREFIX/man -> if you run the default prefix, as seen here, then is should be in correct place.
make uninstall
I can't manage to understand how to check what version we even use. My last resort I see is to run something likeffmpeg -version
and then parse the output using regex.Another question - what is the source of the minimal version - just not working? not compiling? specific "module" version nedded?
I found (finally) the proper way to use those files. But some of the concerns are: how do we distinguish KDE4 and/or KF5 in case both are installed.
I think much better name for the license file would be LICENSE instead of COPYING. What are your thoughts?
Another question about VDPAU: in #22 you mentioned that it also needs libX11, but in the pro file there is no mention of this check. What is the correct way?On the same file, in FFmpeg.pro are those sources/headers optional, if yes in what way? Are they connected to libavdevice?
Also, should we add a sub-option if USE_VDPAU is on to make optional the VDPAU without own video output?
-std=c++11
) flags for CMake < 3.1.0 and GCC and Clang (also for GCC 6, no need to detect compiler version) and Qt 5.7.0The full and cleaned-up task list is in #22