mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Remove hardcoded install paths, port over to CMAKE_INSTALL_*DIR
This commit is contained in:
@@ -55,6 +55,9 @@ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
|||||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||||
|
|
||||||
|
# make predefined install dirs available everywhere
|
||||||
|
INCLUDE(GNUInstallDirs)
|
||||||
|
|
||||||
# installer creation
|
# installer creation
|
||||||
INCLUDE( TomahawkCPack.cmake )
|
INCLUDE( TomahawkCPack.cmake )
|
||||||
|
|
||||||
|
@@ -2,9 +2,9 @@ FILE( GLOB _icons "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
|
|||||||
FOREACH( _file ${_icons} )
|
FOREACH( _file ${_icons} )
|
||||||
STRING( REPLACE "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-" "" _res ${_file} )
|
STRING( REPLACE "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-" "" _res ${_file} )
|
||||||
STRING( REPLACE ".png" "" _res ${_res} )
|
STRING( REPLACE ".png" "" _res ${_res} )
|
||||||
INSTALL( FILES ${_file} RENAME tomahawk.png DESTINATION share/icons/hicolor/${_res}/apps )
|
INSTALL( FILES ${_file} RENAME tomahawk.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${_res}/apps )
|
||||||
ENDFOREACH( _file )
|
ENDFOREACH( _file )
|
||||||
|
|
||||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon.svg RENAME tomahawk.svg DESTINATION share/icons/hicolor/scalable/apps )
|
INSTALL( FILES ${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon.svg RENAME tomahawk.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps )
|
||||||
|
|
||||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.desktop DESTINATION share/applications )
|
INSTALL( FILES ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications )
|
||||||
|
@@ -270,12 +270,12 @@ IF( APPLE )
|
|||||||
ENDIF(HAVE_SPARKLE)
|
ENDIF(HAVE_SPARKLE)
|
||||||
ENDIF( APPLE )
|
ENDIF( APPLE )
|
||||||
|
|
||||||
INSTALL( TARGETS tomahawk BUNDLE DESTINATION . RUNTIME DESTINATION bin )
|
INSTALL( TARGETS tomahawk BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
|
||||||
|
|
||||||
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED AND LEGACY_KDE_INTEGRATION ) #install protocol file
|
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED AND LEGACY_KDE_INTEGRATION ) #install protocol file
|
||||||
FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol )
|
FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol )
|
||||||
STRING( REPLACE "/path/to/binary" # match this
|
STRING( REPLACE "/path/to/binary" # match this
|
||||||
"${CMAKE_INSTALL_PREFIX}/bin/tomahawk" # this is linux (kde) so pretty safe I think
|
"${CMAKE_INSTALL_FULL_BINDIR}/tomahawk" # this is linux (kde) so pretty safe I think
|
||||||
edited_protocol # save in this variable
|
edited_protocol # save in this variable
|
||||||
"${protocol}" # from the contents of this var
|
"${protocol}" # from the contents of this var
|
||||||
)
|
)
|
||||||
@@ -283,7 +283,7 @@ IF( UNIX AND NOT APPLE AND KDE4_INSTALLED AND LEGACY_KDE_INTEGRATION ) #install
|
|||||||
IF( ${SERVICES_INSTALL_DIR} )
|
IF( ${SERVICES_INSTALL_DIR} )
|
||||||
SET( PROTOCOL_INSTALL_DIR ${SERVICES_INSTALL_DIR} )
|
SET( PROTOCOL_INSTALL_DIR ${SERVICES_INSTALL_DIR} )
|
||||||
ELSE()
|
ELSE()
|
||||||
SET( PROTOCOL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/kde4/services" )
|
SET( PROTOCOL_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/kde4/services" )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} )
|
INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@@ -22,4 +22,4 @@ ADD_EXECUTABLE( tomahawk_crash_reporter WIN32 ${crashreporter_SOURCES} ${crashre
|
|||||||
TARGET_LINK_LIBRARIES( tomahawk_crash_reporter ${QT_LIBRARIES} tomahawklib )
|
TARGET_LINK_LIBRARIES( tomahawk_crash_reporter ${QT_LIBRARIES} tomahawklib )
|
||||||
|
|
||||||
INCLUDE(GNUInstallDirs)
|
INCLUDE(GNUInstallDirs)
|
||||||
install(TARGETS tomahawk_crash_reporter RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
install(TARGETS tomahawk_crash_reporter RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_LIBEXECDIR})
|
||||||
|
@@ -669,7 +669,7 @@ TARGET_LINK_LIBRARIES( tomahawklib
|
|||||||
)
|
)
|
||||||
|
|
||||||
INSTALL( TARGETS tomahawklib
|
INSTALL( TARGETS tomahawklib
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
)
|
)
|
||||||
|
@@ -64,7 +64,7 @@ IF( APPLE )
|
|||||||
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
||||||
ENDIF( APPLE )
|
ENDIF( APPLE )
|
||||||
|
|
||||||
install( TARGETS tomahawk_sipjabber DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS tomahawk_sipjabber DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
||||||
|
|
||||||
if(BUILD_GUI)
|
if(BUILD_GUI)
|
||||||
add_subdirectory(googlewrapper)
|
add_subdirectory(googlewrapper)
|
||||||
|
@@ -29,4 +29,4 @@ target_link_libraries( tomahawk_sipgoogle
|
|||||||
tomahawklib
|
tomahawklib
|
||||||
)
|
)
|
||||||
|
|
||||||
install( TARGETS tomahawk_sipgoogle DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS tomahawk_sipgoogle DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
||||||
|
@@ -51,4 +51,4 @@ IF( APPLE )
|
|||||||
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
||||||
ENDIF( APPLE )
|
ENDIF( APPLE )
|
||||||
|
|
||||||
install( TARGETS tomahawk_siptwitter DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS tomahawk_siptwitter DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
||||||
|
@@ -42,4 +42,4 @@ IF( APPLE )
|
|||||||
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
||||||
ENDIF( APPLE )
|
ENDIF( APPLE )
|
||||||
|
|
||||||
install( TARGETS tomahawk_sipzeroconf DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS tomahawk_sipzeroconf DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
||||||
|
5
thirdparty/libportfwd/CMakeLists.txt
vendored
5
thirdparty/libportfwd/CMakeLists.txt
vendored
@@ -48,10 +48,11 @@ ENDIF()
|
|||||||
|
|
||||||
INSTALL( TARGETS tomahawk_portfwd
|
INSTALL( TARGETS tomahawk_portfwd
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
BUNDLE DESTINATION library
|
BUNDLE DESTINATION library
|
||||||
)
|
)
|
||||||
|
|
||||||
#INSTALL(FILES include/portfwd/portfwddllmacro.h include/portfwd/portfwd.h DESTINATION include/portfwd)
|
#INSTALL(FILES include/portfwd/portfwddllmacro.h include/portfwd/portfwd.h DESTINATION include/portfwd)
|
||||||
|
|
||||||
#ADD_EXECUTABLE(portfwd-demo
|
#ADD_EXECUTABLE(portfwd-demo
|
||||||
|
Reference in New Issue
Block a user