enable multiarch build by means of GNUInstallDirs

This patch is taken from the osmo-fl2k debian package.
This commit is contained in:
Thorsten Alteholz 2018-06-03 16:19:38 +02:00 committed by Harald Welte
parent 79908e1109
commit b9fff5b405
2 changed files with 7 additions and 3 deletions

View File

@ -22,6 +22,8 @@
cmake_minimum_required(VERSION 2.6)
project(libosmo-fl2k C)
include(GNUInstallDirs)
#select the release build type by default to get optimization flags
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
@ -157,7 +159,7 @@ CONFIGURE_FILE(
INSTALL(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libosmo-fl2k.pc
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
########################################################################

View File

@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
include(GNUInstallDirs)
MACRO(LIBFL2K_APPEND_SRCS)
LIST(APPEND libosmo-fl2k_srcs ${ARGV})
ENDMACRO(LIBFL2K_APPEND_SRCS)
@ -124,7 +126,7 @@ endif()
# Install built library files & utilities
########################################################################
install(TARGETS ${INSTALL_TARGETS}
LIBRARY DESTINATION ${LIB_INSTALL_DIR} # .so/.dylib file
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} # .lib file
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # .so/.dylib file
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # .lib file
RUNTIME DESTINATION bin # .dll file
)