summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 16:53:14 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 17:26:05 -0200
commit5449deba47e9aa5b9d6f85af3d32ab9f47161e1a (patch)
tree236d3c63fa5903d3e719ab202ec858fe6c136ba7 /cmake/helpers/EflMacros.cmake
parent0ba52770bdadb7cb090c8b1533c83afb193cc8b6 (diff)
cmake: use CMAKE_INSTALL_LIBDIR instead of 'lib'
this matches the platform preference whenever lib, lib32 or lib64.
Diffstat (limited to 'cmake/helpers/EflMacros.cmake')
-rw-r--r--cmake/helpers/EflMacros.cmake30
1 files changed, 17 insertions, 13 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index fb783b086d..a319902285 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -616,7 +616,7 @@ eolian_flags=-I\${pc_sysrootdir}\${eoincludedir}/${EFL_LIB_CURRENT}-${PROJECT_VE
616 set(_contents 616 set(_contents
617"prefix=${CMAKE_INSTALL_PREFIX} 617"prefix=${CMAKE_INSTALL_PREFIX}
618exec_prefix=\${prefix} 618exec_prefix=\${prefix}
619libdir=\${exec_prefix}/lib 619libdir=\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}
620includedir=\${prefix}/include 620includedir=\${prefix}/include
621datarootdir=\${prefix}/share 621datarootdir=\${prefix}/share
622datadir=\${datarootdir} 622datadir=\${datarootdir}
@@ -633,9 +633,9 @@ Libs: -L\${libdir} -l${EFL_LIB_CURRENT}${_public_libraries}
633Libs.private:${_libraries} 633Libs.private:${_libraries}
634Cflags: -I\${includedir}/efl-${PROJECT_VERSION_MAJOR}${_cflags} 634Cflags: -I\${includedir}/efl-${PROJECT_VERSION_MAJOR}${_cflags}
635") 635")
636 file(WRITE "${CMAKE_BINARY_DIR}/lib/pkgconfig/${EFL_LIB_CURRENT}.pc" "${_contents}") 636 file(WRITE "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/${EFL_LIB_CURRENT}.pc" "${_contents}")
637 install(FILES "${CMAKE_BINARY_DIR}/lib/pkgconfig/${EFL_LIB_CURRENT}.pc" 637 install(FILES "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/${EFL_LIB_CURRENT}.pc"
638 DESTINATION "lib/pkgconfig") 638 DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
639endfunction() 639endfunction()
640 640
641# _EFL_INCLUDE_OR_DETECT(Name Source_Dir) 641# _EFL_INCLUDE_OR_DETECT(Name Source_Dir)
@@ -791,7 +791,7 @@ define_property(TARGET PROPERTY EFL_EO_PUBLIC
791# 791#
792# This is simiar to EFL_LIB(), however defaults to STATIC libraries 792# This is simiar to EFL_LIB(), however defaults to STATIC libraries
793# and if set to SHARED will install to 793# and if set to SHARED will install to
794# lib/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} 794# ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
795# and it shouldn't set any PUBLIC_HEADERS or PKG_CONFIG_REQUIRES. 795# and it shouldn't set any PUBLIC_HEADERS or PKG_CONFIG_REQUIRES.
796function(EFL_SUPPORT_LIB _target) 796function(EFL_SUPPORT_LIB _target)
797 set(EFL_LIB_CURRENT ${_target}) 797 set(EFL_LIB_CURRENT ${_target})
@@ -893,10 +893,14 @@ function(EFL_SUPPORT_LIB _target)
893 893
894 if(LIBRARY_TYPE STREQUAL "SHARED") 894 if(LIBRARY_TYPE STREQUAL "SHARED")
895 install(TARGETS support-${_target} 895 install(TARGETS support-${_target}
896 RUNTIME DESTINATION lib/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} 896 RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
897 LIBRARY DESTINATION lib/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}) 897 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
898 set_target_properties(support-${_target} PROPERTIES
899 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
900 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
898 else() 901 else()
899 set_target_properties(support-${_target} PROPERTIES 902 set_target_properties(support-${_target} PROPERTIES
903 ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
900 POSITION_INDEPENDENT_CODE TRUE) 904 POSITION_INDEPENDENT_CODE TRUE)
901 endif() 905 endif()
902 906
@@ -984,7 +988,7 @@ function(EFL_LIB _target)
984 set(EFL_MODULES_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/modules/${_target}) 988 set(EFL_MODULES_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/modules/${_target})
985 set(EFL_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/tests/${_target}) 989 set(EFL_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/tests/${_target})
986 set(EFL_TESTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/tests/${_target}) 990 set(EFL_TESTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/tests/${_target})
987 set(EFL_UTILS_DIR lib/${_target}/utils/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}) 991 set(EFL_UTILS_DIR ${CMAKE_INSTALL_LIBDIR}/${_target}/utils/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
988 992
989 unset(EFL_ALL_OPTIONS_${EFL_LIB_CURRENT} CACHE) 993 unset(EFL_ALL_OPTIONS_${EFL_LIB_CURRENT} CACHE)
990 994
@@ -1103,8 +1107,8 @@ function(EFL_LIB _target)
1103 install(TARGETS ${_target} 1107 install(TARGETS ${_target}
1104 PUBLIC_HEADER DESTINATION include/${_target}-${PROJECT_VERSION_MAJOR} 1108 PUBLIC_HEADER DESTINATION include/${_target}-${PROJECT_VERSION_MAJOR}
1105 RUNTIME DESTINATION bin 1109 RUNTIME DESTINATION bin
1106 ARCHIVE DESTINATION lib 1110 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
1107 LIBRARY DESTINATION lib) 1111 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
1108 install(FILES 1112 install(FILES
1109 ${_public_eo_files} DESTINATION share/eolian/include/${_target}-${PROJECT_VERSION_MAJOR} 1113 ${_public_eo_files} DESTINATION share/eolian/include/${_target}-${PROJECT_VERSION_MAJOR}
1110 ) 1114 )
@@ -1424,7 +1428,7 @@ endfunction()
1424# - DEFINITIONS 1428# - DEFINITIONS
1425# - MODULE_TYPE: one of ON;OFF;STATIC, defaults to ON 1429# - MODULE_TYPE: one of ON;OFF;STATIC, defaults to ON
1426# - INSTALL_DIR: defaults to 1430# - INSTALL_DIR: defaults to
1427# lib/${EFL_LIB_CURRENT}/modules/${EFL_MODULE_SCOPE}/${Name}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}/. 1431# ${CMAKE_INSTALL_LIBDIR}/${EFL_LIB_CURRENT}/modules/${EFL_MODULE_SCOPE}/${Name}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}/.
1428# If empty, won't install. 1432# If empty, won't install.
1429# - PKG_CONFIG_REQUIRES_PRIVATE: results in 1433# - PKG_CONFIG_REQUIRES_PRIVATE: results in
1430# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE. Elements after 'OPTIONAL' 1434# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE. Elements after 'OPTIONAL'
@@ -1436,7 +1440,7 @@ endfunction()
1436function(EFL_MODULE _modname) 1440function(EFL_MODULE _modname)
1437 if(EFL_MODULE_SCOPE) 1441 if(EFL_MODULE_SCOPE)
1438 set(_modsrcdir ${EFL_MODULES_SOURCE_DIR}/${EFL_MODULE_SCOPE}/${_modname}) 1442 set(_modsrcdir ${EFL_MODULES_SOURCE_DIR}/${EFL_MODULE_SCOPE}/${_modname})
1439 set(_modoutdir lib/${EFL_LIB_CURRENT}/modules/${EFL_MODULE_SCOPE}/${_modname}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}) 1443 set(_modoutdir ${CMAKE_INSTALL_LIBDIR}/${EFL_LIB_CURRENT}/modules/${EFL_MODULE_SCOPE}/${_modname}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
1440 set(_modbindir ${EFL_MODULES_BINARY_DIR}/${EFL_MODULE_SCOPE}/${_modname}) 1444 set(_modbindir ${EFL_MODULES_BINARY_DIR}/${EFL_MODULE_SCOPE}/${_modname})
1441 set(_modtarget ${EFL_LIB_CURRENT}-module-${EFL_MODULE_SCOPE}-${_modname}) 1445 set(_modtarget ${EFL_LIB_CURRENT}-module-${EFL_MODULE_SCOPE}-${_modname})
1442 string(TOUPPER "${EFL_LIB_CURRENT}_MODULE_TYPE_${EFL_MODULE_SCOPE}_${_modname}" _modoptionname) 1446 string(TOUPPER "${EFL_LIB_CURRENT}_MODULE_TYPE_${EFL_MODULE_SCOPE}_${_modname}" _modoptionname)
@@ -1446,7 +1450,7 @@ function(EFL_MODULE _modname)
1446 EFL_OPTION(${_modoptionname} "Build ${EFL_LIB_CURRENT} module ${EFL_MODULE_SCOPE}/${_modname}" ${${_modoptionname}_DEFAULT} CHOICE ON;OFF;STATIC) 1450 EFL_OPTION(${_modoptionname} "Build ${EFL_LIB_CURRENT} module ${EFL_MODULE_SCOPE}/${_modname}" ${${_modoptionname}_DEFAULT} CHOICE ON;OFF;STATIC)
1447 else() 1451 else()
1448 set(_modsrcdir ${EFL_MODULES_SOURCE_DIR}/${_modname}) 1452 set(_modsrcdir ${EFL_MODULES_SOURCE_DIR}/${_modname})
1449 set(_modoutdir lib/${EFL_LIB_CURRENT}/modules/${_modname}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}) 1453 set(_modoutdir ${CMAKE_INSTALL_LIBDIR}/${EFL_LIB_CURRENT}/modules/${_modname}/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
1450 set(_modbindir ${EFL_MODULES_BINARY_DIR}/${_modname}) 1454 set(_modbindir ${EFL_MODULES_BINARY_DIR}/${_modname})
1451 set(_modtarget ${EFL_LIB_CURRENT}-module-${_modname}) 1455 set(_modtarget ${EFL_LIB_CURRENT}-module-${_modname})
1452 string(TOUPPER "${EFL_LIB_CURRENT}_MODULE_TYPE_${_modname}" _modoptionname) 1456 string(TOUPPER "${EFL_LIB_CURRENT}_MODULE_TYPE_${_modname}" _modoptionname)