Signed-off-by: gregory guy <gregory-tde@laposte.net>pull/3/head
parent
8fc6ff536e
commit
b18bd2dc5f
@ -0,0 +1,88 @@
|
|||||||
|
############################################
|
||||||
|
# #
|
||||||
|
# Improvements and feedbacks are welcome #
|
||||||
|
# #
|
||||||
|
# This file is released under GPL >= 3 #
|
||||||
|
# #
|
||||||
|
############################################
|
||||||
|
|
||||||
|
|
||||||
|
cmake_minimum_required( VERSION 2.8.12 )
|
||||||
|
|
||||||
|
|
||||||
|
#### general package setup
|
||||||
|
|
||||||
|
project( guidance )
|
||||||
|
set( VERSION R14.1.0 )
|
||||||
|
|
||||||
|
|
||||||
|
#### include essential cmake modules
|
||||||
|
|
||||||
|
include( FindPkgConfig )
|
||||||
|
include( CheckFunctionExists )
|
||||||
|
include( CheckSymbolExists )
|
||||||
|
include( CheckIncludeFile )
|
||||||
|
include( CheckLibraryExists )
|
||||||
|
include( CheckCSourceCompiles )
|
||||||
|
include( CheckCXXSourceCompiles )
|
||||||
|
|
||||||
|
|
||||||
|
#### include our cmake modules
|
||||||
|
|
||||||
|
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
|
||||||
|
include( TDEMacros )
|
||||||
|
|
||||||
|
|
||||||
|
##### setup install paths
|
||||||
|
|
||||||
|
include( TDESetupPaths )
|
||||||
|
tde_setup_paths( )
|
||||||
|
|
||||||
|
|
||||||
|
##### optional stuff
|
||||||
|
|
||||||
|
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
|
||||||
|
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
|
||||||
|
|
||||||
|
|
||||||
|
##### user requested modules
|
||||||
|
|
||||||
|
option( BUILD_ALL "Build all" ON )
|
||||||
|
option( BUILD_MOUNTCONFIG "Build mountconfig" ${BUILD_ALL} )
|
||||||
|
option( BUILD_SERVICECONFIG "Build serviceconfig" ${BUILD_ALL} )
|
||||||
|
option( BUILD_USERCONFIG "Build userconfig" ${BUILD_ALL} )
|
||||||
|
option( BUILD_WINECONFIG "Build wineconfig" ${BUILD_ALL} )
|
||||||
|
option( BUILD_IXF86 "Build ixf86 setting" ${BUILD_ALL} ) # OFF
|
||||||
|
option( BUILD_GRUB "Build grug setting" ${BUILD_ALL} ) # OFF
|
||||||
|
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
|
||||||
|
|
||||||
|
|
||||||
|
##### configure checks
|
||||||
|
|
||||||
|
include( ConfigureChecks.cmake )
|
||||||
|
|
||||||
|
|
||||||
|
###### global compiler settings
|
||||||
|
|
||||||
|
add_definitions( -DHAVE_CONFIG_H )
|
||||||
|
|
||||||
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
|
||||||
|
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||||
|
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||||
|
|
||||||
|
|
||||||
|
##### directories
|
||||||
|
|
||||||
|
add_subdirectory( kde )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_MOUNTCONFIG mountconfig )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_SERVICECONFIG serviceconfig )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_USERCONFIG userconfig )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_WINECONFIG wineconfig )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_IXF86 modules )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_GRUB grubconfig )
|
||||||
|
tde_conditional_add_project_docs( BUILD_DOC )
|
||||||
|
|
||||||
|
|
||||||
|
##### write configure files
|
||||||
|
|
||||||
|
configure_file( config.h.cmake config.h @ONLY )
|
@ -0,0 +1,104 @@
|
|||||||
|
###########################################
|
||||||
|
# #
|
||||||
|
# Improvements and feedback are welcome #
|
||||||
|
# #
|
||||||
|
# This file is released under GPL >= 3 #
|
||||||
|
# #
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
# required stuff
|
||||||
|
find_package( TQt )
|
||||||
|
find_package( TDE )
|
||||||
|
|
||||||
|
tde_setup_architecture_flags( )
|
||||||
|
|
||||||
|
include(TestBigEndian)
|
||||||
|
test_big_endian(WORDS_BIGENDIAN)
|
||||||
|
|
||||||
|
tde_setup_largefiles( )
|
||||||
|
|
||||||
|
|
||||||
|
##### check for gcc visibility support
|
||||||
|
|
||||||
|
if( WITH_GCC_VISIBILITY )
|
||||||
|
tde_setup_gcc_visibility( )
|
||||||
|
endif( WITH_GCC_VISIBILITY )
|
||||||
|
|
||||||
|
|
||||||
|
##### X11 lib
|
||||||
|
|
||||||
|
find_package( X11 COMPONENTS Xxf86vm Xrandr Xscreensaver )
|
||||||
|
|
||||||
|
|
||||||
|
##### look for pytdeextensions
|
||||||
|
|
||||||
|
find_path( PYTHONIZE_INCLUDE_DIR pythonize.h
|
||||||
|
HINTS /opt/trinity/include
|
||||||
|
)
|
||||||
|
find_library( PYTHONIZE_LIBRARY pythonize
|
||||||
|
HINTS /opt/trinity/lib /opt/trinity/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
if( PYTHONIZE_INCLUDE_DIR AND PYTHONIZE_LIBRARY )
|
||||||
|
set( PYTHONIZE_INCLUDE_DIRS "${PYTHONIZE_INCLUDE_DIR}" )
|
||||||
|
set( PYTHONIZE_LIBRARIES ${PYTHONIZE_LIBRARY} )
|
||||||
|
else()
|
||||||
|
tde_message_fatal( "Pythonize (pytdeextensions) is required but was not found on your system" )
|
||||||
|
endif( PYTHONIZE_INCLUDE_DIR AND PYTHONIZE_LIBRARY )
|
||||||
|
|
||||||
|
|
||||||
|
##### look for Python
|
||||||
|
|
||||||
|
if( ${CMAKE_VERSION} VERSION_LESS "3.12" )
|
||||||
|
find_package( PythonInterp )
|
||||||
|
find_package( PythonLibs )
|
||||||
|
if( NOT PYTHONLIBS_FOUND )
|
||||||
|
tde_message_fatal( "Python is required but was not found on your system" )
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
find_package( Python COMPONENTS Interpreter Development )
|
||||||
|
if( NOT Python_Development_FOUND )
|
||||||
|
tde_message_fatal( "Python is required but was not found on your system" )
|
||||||
|
endif()
|
||||||
|
set( PYTHON_INCLUDE_DIRS "${Python_INCLUDE_DIRS}" )
|
||||||
|
set( PYTHON_LIBRARIES ${Python_LIBRARIES} )
|
||||||
|
endif( ${CMAKE_VERSION} VERSION_LESS "3.12" )
|
||||||
|
|
||||||
|
if( BUILD_IXF86 ) # we should have a Python Interpreter at this point
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${Python_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
|
||||||
|
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
set( PYTHON_SITE_PACKAGES "${PYTHON_SITE_PACKAGES}" CACHE INTERNAL "" )
|
||||||
|
endif( BUILD_IXF86 )
|
||||||
|
|
||||||
|
|
||||||
|
##### look for tdepyuic
|
||||||
|
|
||||||
|
if( BUILD_MOUNTCONFIG )
|
||||||
|
find_program( PYUIC_EXECUTABLE tdepyuic
|
||||||
|
HINTS /opt/trinity/bin
|
||||||
|
)
|
||||||
|
if( PYUIC_EXECUTABLE-NOTFOUND )
|
||||||
|
tde_message_fatal( "The Python User Interface Compiler (tdepyuic) is required but was not found on your system" )
|
||||||
|
endif()
|
||||||
|
endif( BUILD_MOUNTCONFIG )
|
||||||
|
|
||||||
|
|
||||||
|
##### look for Hal
|
||||||
|
|
||||||
|
pkg_search_module( HAL_LAYER hal )
|
||||||
|
if( HAL_LAYER_FOUND )
|
||||||
|
set( WITH_HAL 1 )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
##### look for Grub Legacy
|
||||||
|
|
||||||
|
if( BUILD_GRUB )
|
||||||
|
find_file( GRUB "/boot/grub/menu.lst" )
|
||||||
|
if( GRUB-NOTFOUND )
|
||||||
|
tde_message_fatal( "grubconfig is available for Grub Legacy only" )
|
||||||
|
endif()
|
||||||
|
endif( BUILD_GRUB )
|
@ -0,0 +1,8 @@
|
|||||||
|
#define VERSION "@VERSION@"
|
||||||
|
|
||||||
|
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
|
||||||
|
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
|
||||||
|
|
||||||
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||||
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||||
|
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
|
@ -0,0 +1,9 @@
|
|||||||
|
##### other data
|
||||||
|
|
||||||
|
tde_create_translated_desktop( grubconfig.desktop )
|
||||||
|
|
||||||
|
|
||||||
|
install(
|
||||||
|
PROGRAMS grubconfig.py
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/python-support/tde-guidance-trinity
|
||||||
|
)
|
@ -0,0 +1,4 @@
|
|||||||
|
tde_conditional_add_subdirectory( BUILD_MOUNTCONFIG mountconfig/pics )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_SERVICECONFIG serviceconfig/pics )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_USERCONFIG userconfig/pics )
|
||||||
|
tde_conditional_add_subdirectory( BUILD_WINECONFIG wineconfig/pics )
|
@ -0,0 +1,3 @@
|
|||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,6 @@
|
|||||||
|
add_subdirectory( 16x16 )
|
||||||
|
|
||||||
|
|
||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,3 @@
|
|||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,6 @@
|
|||||||
|
add_subdirectory( 16x16 )
|
||||||
|
|
||||||
|
|
||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,3 @@
|
|||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,6 @@
|
|||||||
|
add_subdirectory( 16x16 )
|
||||||
|
|
||||||
|
|
||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,3 @@
|
|||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,6 @@
|
|||||||
|
add_subdirectory( 16x16 )
|
||||||
|
|
||||||
|
|
||||||
|
##### icons
|
||||||
|
|
||||||
|
tde_install_icons()
|
@ -0,0 +1,32 @@
|
|||||||
|
include_directories(
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${PYTHON_INCLUDE_DIRS}
|
||||||
|
${X11_INCLUDE_DIR}
|
||||||
|
${X11_xf86vmode_INCLUDE_PATH}
|
||||||
|
${X11_Xrandr_INCLUDE_PATH}
|
||||||
|
${X11_Xscreensaver_INCLUDE_PATH}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### ixf86misc (module)
|
||||||
|
|
||||||
|
tde_add_library( ixf86misc MODULE
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
ixf86misc.c
|
||||||
|
LINK
|
||||||
|
${X11_LIBRARIES}
|
||||||
|
${X11_Xxf86vm_LIB}
|
||||||
|
${X11_Xrandr_LIB}
|
||||||
|
${X11_Xscreensaver_LIB}
|
||||||
|
${PYTHON_LIBRARIES}
|
||||||
|
|
||||||
|
DESTINATION ${PYTHON_SITE_PACKAGES}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
PROGRAMS xf86misc.py
|
||||||
|
DESTINATION ${PYTHON_SITE_PACKAGES}
|
||||||
|
)
|
@ -0,0 +1,60 @@
|
|||||||
|
include_directories(
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${TDE_INCLUDE_DIR}
|
||||||
|
${TQT_INCLUDE_DIRS}
|
||||||
|
${PYTHONIZE_INCLUDE_DIRS}
|
||||||
|
${PYTHON_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
link_directories(
|
||||||
|
${TQT_LIBRARY_DIRS}
|
||||||
|
${TDE_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT fuser_ui.py
|
||||||
|
COMMAND ${PYUIC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/fuser_ui.ui
|
||||||
|
COMMENT "Generate fuser_ui.py file..."
|
||||||
|
)
|
||||||
|
add_custom_target( fuser_ui-py DEPENDS fuser_ui.py )
|
||||||
|
|
||||||
|
|
||||||
|
#### kcm_mountconfig (kpart)
|
||||||
|
|
||||||
|
tde_add_kpart( kcm_mountconfig
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
kcm_mountconfig.cpp
|
||||||
|
LINK
|
||||||
|
tdecore-shared
|
||||||
|
tdeui-shared
|
||||||
|
${PYTHONIZE_LIBRARIES}
|
||||||
|
${PYTHON_LIBRARIES}
|
||||||
|
dl
|
||||||
|
|
||||||
|
DEPENDENCIES fuser_ui-py
|
||||||
|
|
||||||
|
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### other data
|
||||||
|
|
||||||
|
tde_create_translated_desktop( mountconfig.desktop )
|
||||||
|
|
||||||
|
|
||||||
|
install(
|
||||||
|
PROGRAMS fuser.py mountconfig.py SimpleCommandRunner.py sizeview.py SMBShareSelectDialog.py fuser_ui.py
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/python-support/tde-guidance-trinity
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if ( WITH_HAL )
|
||||||
|
install(
|
||||||
|
PROGRAMS MicroHAL.py
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/python-support/tde-guidance-trinity
|
||||||
|
)
|
||||||
|
endif( WITH_HAL )
|
@ -0,0 +1,42 @@
|
|||||||
|
include_directories(
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${TDE_INCLUDE_DIR}
|
||||||
|
${TQT_INCLUDE_DIRS}
|
||||||
|
${PYTHONIZE_INCLUDE_DIRS}
|
||||||
|
${PYTHON_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
link_directories(
|
||||||
|
${TQT_LIBRARY_DIRS}
|
||||||
|
${TDE_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#### kcm_serviceconfig (kpart)
|
||||||
|
|
||||||
|
tde_add_kpart( kcm_serviceconfig
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
kcm_serviceconfig.cpp
|
||||||
|
LINK
|
||||||
|
tdecore-shared
|
||||||
|
tdeui-shared
|
||||||
|
${PYTHONIZE_LIBRARIES}
|
||||||
|
${PYTHON_LIBRARIES}
|
||||||
|
dl
|
||||||
|
|
||||||
|
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### other data
|
||||||
|
|
||||||
|
tde_create_translated_desktop( serviceconfig.desktop )
|
||||||
|
|
||||||
|
|
||||||
|
install(
|
||||||
|
PROGRAMS serviceconfig.py
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/python-support/tde-guidance-trinity
|
||||||
|
)
|
@ -0,0 +1,42 @@
|
|||||||
|
include_directories(
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${TDE_INCLUDE_DIR}
|
||||||
|
${TQT_INCLUDE_DIRS}
|
||||||
|
${PYTHONIZE_INCLUDE_DIRS}
|
||||||
|
${PYTHON_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
link_directories(
|
||||||
|
${TQT_LIBRARY_DIRS}
|
||||||
|
${TDE_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#### kcm_userconfig (kpart)
|
||||||
|
|
||||||
|
tde_add_kpart( kcm_userconfig
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
kcm_userconfig.cpp
|
||||||
|
LINK
|
||||||
|
tdecore-shared
|
||||||
|
tdeui-shared
|
||||||
|
${PYTHONIZE_LIBRARIES}
|
||||||
|
${PYTHON_LIBRARIES}
|
||||||
|
dl
|
||||||
|
|
||||||
|
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### other data
|
||||||
|
|
||||||
|
tde_create_translated_desktop( userconfig.desktop )
|
||||||
|
|
||||||
|
|
||||||
|
install(
|
||||||
|
PROGRAMS userconfig.py unixauthdb.py
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/python-support/tde-guidance-trinity
|
||||||
|
)
|
@ -0,0 +1,42 @@
|
|||||||
|
include_directories(
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${TDE_INCLUDE_DIR}
|
||||||
|
${TQT_INCLUDE_DIRS}
|
||||||
|
${PYTHONIZE_INCLUDE_DIRS}
|
||||||
|
${PYTHON_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
link_directories(
|
||||||
|
${TQT_LIBRARY_DIRS}
|
||||||
|
${TDE_LIB_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#### kcm_wineconfig (kpart)
|
||||||
|
|
||||||
|
tde_add_kpart( kcm_wineconfig
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
kcm_wineconfig.cpp
|
||||||
|
LINK
|
||||||
|
tdecore-shared
|
||||||
|
tdeui-shared
|
||||||
|
${PYTHONIZE_LIBRARIES}
|
||||||
|
${PYTHON_LIBRARIES}
|
||||||
|
dl
|
||||||
|
|
||||||
|
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### other data
|
||||||
|
|
||||||
|
tde_create_translated_desktop( wineconfig.desktop )
|
||||||
|
|
||||||
|
|
||||||
|
install(
|
||||||
|
PROGRAMS wineread.py winewrite.py wineconfig.py
|
||||||
|
DESTINATION ${DATA_INSTALL_DIR}/python-support/tde-guidance-trinity
|
||||||
|
)
|
Loading…
Reference in new issue