summaryrefslogtreecommitdiff
path: root/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
parent180d8f7db61632e0f4de3d061a49e6787c0ab7d7 (diff)
cmake: define EFL_{LIB}_BUILD and DLL_EXPORT.
These are used on Windows builds to force dllexport/dllimport.
Diffstat (limited to '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)
set(PUBLIC_EO_FILES)
set(EO_FILES)
+ string(TOUPPER "${_target}" _target_uc)
+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/${_target}.cmake OPTIONAL)
include(${EFL_LIB_SOURCE_DIR}/CMakeLists.txt OPTIONAL)
if(LIBRARY_TYPE STREQUAL SHARED AND NOT PUBLIC_HEADERS)
@@ -897,12 +899,13 @@ function(EFL_LIB _target)
add_library(${_target} ${LIBRARY_TYPE} ${_sources} ${_headers})
set_target_properties(${_target} PROPERTIES
FRAMEWORK TRUE
+ DEFINE_SYMBOL "EFL_${_target_uc}_BUILD"
PUBLIC_HEADER "${_headers}"
OBJECT_DEPENDS "${_obj_deps}"
EFL_EO_PRIVATE "${_eo_files}"
EFL_EO_PUBLIC "${_public_eo_files}"
LINK_FLAGS "${_link_flags}"
- COMPILE_FLAGS "${_compile_flags}")
+ COMPILE_FLAGS "${_compile_flags} -DDLL_EXPORT")
if(DEPENDENCIES)
add_dependencies(${_target} ${DEPENDENCIES})