|
|
|
@ -37,21 +37,19 @@ option( WITH_MAD "Enable MAD mp3 decoder support" ON )
|
|
|
|
|
|
|
|
|
|
##### paths setup ###############################
|
|
|
|
|
|
|
|
|
|
if( NOT BIN_INSTALL_DIR )
|
|
|
|
|
set( BIN_INSTALL_DIR bin )
|
|
|
|
|
endif ( NOT BIN_INSTALL_DIR )
|
|
|
|
|
macro( _tde_internal_setup_path _path _default )
|
|
|
|
|
if( DEFINED ${_path} )
|
|
|
|
|
set( ${_path} "${${_path}}" CACHE INTERNAL "" FORCE )
|
|
|
|
|
else( )
|
|
|
|
|
set( ${_path} "${_default}" )
|
|
|
|
|
endif( )
|
|
|
|
|
endmacro( _tde_internal_setup_path )
|
|
|
|
|
|
|
|
|
|
if( NOT LIB_INSTALL_DIR )
|
|
|
|
|
set( LIB_INSTALL_DIR lib )
|
|
|
|
|
endif( NOT LIB_INSTALL_DIR )
|
|
|
|
|
|
|
|
|
|
if( NOT INCLUDE_INSTALL_DIR )
|
|
|
|
|
set( INCLUDE_INSTALL_DIR include/${CMAKE_PROJECT_NAME} )
|
|
|
|
|
endif( NOT INCLUDE_INSTALL_DIR )
|
|
|
|
|
|
|
|
|
|
if( NOT PKGCONFIG_INSTALL_DIR )
|
|
|
|
|
set( PKGCONFIG_INSTALL_DIR lib/pkgconfig )
|
|
|
|
|
endif( NOT PKGCONFIG_INSTALL_DIR )
|
|
|
|
|
_tde_internal_setup_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
|
|
|
|
|
_tde_internal_setup_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
|
|
|
|
|
_tde_internal_setup_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
|
|
|
|
|
_tde_internal_setup_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}" )
|
|
|
|
|
_tde_internal_setup_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##### check for include files ###################
|
|
|
|
@ -192,6 +190,9 @@ configure_file( config.h.cmake config.h @ONLY )
|
|
|
|
|
|
|
|
|
|
##### write pkgconfig file ######################
|
|
|
|
|
|
|
|
|
|
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
|
|
|
|
|
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
|
|
|
|
|
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
|
|
|
|
|
configure_file( arts.pc.cmake arts.pc @ONLY )
|
|
|
|
|
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/arts.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
|
|
|
|
|
|
|
|
|
|