summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 14:20:52 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 14:23:24 -0200
commite1937739a27332eed2a4f2940f7707614e76bdb2 (patch)
treec68fb9231c3db8c38b6d7adf9c215c96da7cafcb /cmake/helpers/EflMacros.cmake
parent180d8f7db61632e0f4de3d061a49e6787c0ab7d7 (diff)
cmake: define EFL_{LIB}_BUILD and DLL_EXPORT.
These are used on Windows builds to force dllexport/dllimport.
Diffstat (limited to 'cmake/helpers/EflMacros.cmake')
-rw-r--r--cmake/helpers/EflMacros.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index 002b06e00d..2f52830315 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -854,6 +854,8 @@ function(EFL_LIB _target)
854 set(PUBLIC_EO_FILES) 854 set(PUBLIC_EO_FILES)
855 set(EO_FILES) 855 set(EO_FILES)
856 856
857 string(TOUPPER "${_target}" _target_uc)
858
857 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/${_target}.cmake OPTIONAL) 859 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/${_target}.cmake OPTIONAL)
858 include(${EFL_LIB_SOURCE_DIR}/CMakeLists.txt OPTIONAL) 860 include(${EFL_LIB_SOURCE_DIR}/CMakeLists.txt OPTIONAL)
859 if(LIBRARY_TYPE STREQUAL SHARED AND NOT PUBLIC_HEADERS) 861 if(LIBRARY_TYPE STREQUAL SHARED AND NOT PUBLIC_HEADERS)
@@ -897,12 +899,13 @@ function(EFL_LIB _target)
897 add_library(${_target} ${LIBRARY_TYPE} ${_sources} ${_headers}) 899 add_library(${_target} ${LIBRARY_TYPE} ${_sources} ${_headers})
898 set_target_properties(${_target} PROPERTIES 900 set_target_properties(${_target} PROPERTIES
899 FRAMEWORK TRUE 901 FRAMEWORK TRUE
902 DEFINE_SYMBOL "EFL_${_target_uc}_BUILD"
900 PUBLIC_HEADER "${_headers}" 903 PUBLIC_HEADER "${_headers}"
901 OBJECT_DEPENDS "${_obj_deps}" 904 OBJECT_DEPENDS "${_obj_deps}"
902 EFL_EO_PRIVATE "${_eo_files}" 905 EFL_EO_PRIVATE "${_eo_files}"
903 EFL_EO_PUBLIC "${_public_eo_files}" 906 EFL_EO_PUBLIC "${_public_eo_files}"
904 LINK_FLAGS "${_link_flags}" 907 LINK_FLAGS "${_link_flags}"
905 COMPILE_FLAGS "${_compile_flags}") 908 COMPILE_FLAGS "${_compile_flags} -DDLL_EXPORT")
906 909
907 if(DEPENDENCIES) 910 if(DEPENDENCIES)
908 add_dependencies(${_target} ${DEPENDENCIES}) 911 add_dependencies(${_target} ${DEPENDENCIES})