summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-08-04 16:23:49 +0900
committerMichele Calgaro <[email protected]>2023-08-06 17:09:43 +0900
commitb7e134e27e65c5cc4ae2cd49d41f680ffa20a593 (patch)
treec5dc23628f49091d3f6e8e82f5bb556985399020 /src
parent0984c8a873d7ed24259cf1ba600a3c989cdb3b08 (diff)
downloadk9copy-b7e134e27e65c5cc4ae2cd49d41f680ffa20a593.tar.gz
k9copy-b7e134e27e65c5cc4ae2cd49d41f680ffa20a593.zip
Conversion to cmake build system
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 4aae9b72d7164684622eab039f82833d02d3ce7a)
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt60
-rw-r--r--src/k9glwidget.h4
-rw-r--r--src/kviewmpeg2.cpp7
3 files changed, 69 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..0b70b10
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,60 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/k9Mplayer
+ ${CMAKE_SOURCE_DIR}/k9author
+ ${CMAKE_SOURCE_DIR}/k9decmpeg
+ ${CMAKE_SOURCE_DIR}/k9devices
+ ${CMAKE_SOURCE_DIR}/k9vamps
+ ${CMAKE_SOURCE_DIR}/libdvdnav
+ ${CMAKE_SOURCE_DIR}/libk9copy
+ ${TDE_INCLUDE_DIR}
+)
+
+link_directories(
+ ${TDE_LIB_DIR}
+ ${LIBAVCODEC_LIBRARY_DIRS}
+ ${LIBAVFORMAT_LIBRARY_DIRS}
+ ${LIBAVUTIL_LIBRARY_DIRS}
+ ${LIBSWSCALE_LIBRARY_DIRS}
+)
+
+##### k9copy (executable)
+file( GLOB _lib_cpp_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp )
+file( GLOB _lib_ui_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui )
+
+tde_add_executable( k9copy AUTOMOC
+ SOURCES ${_lib_cpp_files} ${_lib_ui_files}
+ LINK
+ k9mplayer-static k9author-static k9decmpeg-static k9devices-static
+ k9vamps-static k9dvdnav-static k9copy-static
+ tdecore-shared tdefx-shared tdeui-shared tdeio-shared tdehtml-shared
+ tdetexteditor-shared tdeparts-shared tdemdi-shared DCOP-shared
+ ${LIBAVCODEC_LIBRARIES} ${LIBAVFORMAT_LIBRARIES} ${LIBAVUTIL_LIBRARIES}
+ ${LIBSWSCALE_LIBRARIES} ${LIBDVDREAD_LIBRARIES} ${K3BDEVICE_LIBRARY}
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### app icon
+
+tde_install_icons( ${PROJECT_NAME} )
+
+
+##### other files
+
+install(
+ FILES anim.mng k9copyui.rc mencoder.xml
+ DESTINATION ${DATA_INSTALL_DIR}/k9copy
+)
+
+tde_create_translated_desktop(
+ SOURCE k9copy_open.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus
+)
+
+tde_create_translated_desktop(
+ SOURCE k9copy.desktop
+ DESTINATION ${XDG_APPS_INSTALL_DIR}
+)
diff --git a/src/k9glwidget.h b/src/k9glwidget.h
index 21fea91..0f55560 100644
--- a/src/k9glwidget.h
+++ b/src/k9glwidget.h
@@ -12,6 +12,10 @@
#ifndef K9GLWIDGET_H
#define K9GLWIDGET_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "k9common.h"
#ifdef Q_MOC_RUN
diff --git a/src/kviewmpeg2.cpp b/src/kviewmpeg2.cpp
index 2433df3..7f369a1 100644
--- a/src/kviewmpeg2.cpp
+++ b/src/kviewmpeg2.cpp
@@ -17,6 +17,11 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "k9common.h"
#include <tqpixmap.h>
#include <tqpainter.h>
@@ -86,10 +91,8 @@ kViewMPEG2::kViewMPEG2() {
m_layout=new TQGridLayout(label,1,1);
#ifdef HAVE_OPENGL
-
readSettings();
#else
-
m_prefUseGL=FALSE;
#endif
//disable the option use_gl, so if k9copy crash, we restart without gl