summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-23 18:25:22 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-23 18:25:22 -0200
commit5e294031de7403512a838776e383bae601df47d6 (patch)
treea740aeb2eccfa86561a8a9357eb521f67bf05acf
parent0f8a6d04abbc50075cd6194a5fc5f033b897e0b1 (diff)
cmake: fix module define translation.
we can't check the options in config/eina.cmake as they were not created at that point, instead we must have a "post" file that is included after everything else is processed, options/targets all exist and can be modified.
-rw-r--r--cmake/config/eina.cmake15
-rw-r--r--cmake/helpers/EflMacros.cmake2
-rw-r--r--cmake/post/eina.cmake21
3 files changed, 23 insertions, 15 deletions
diff --git a/cmake/config/eina.cmake b/cmake/config/eina.cmake
index 6a8f7d0d08..a48a14d69a 100644
--- a/cmake/config/eina.cmake
+++ b/cmake/config/eina.cmake
@@ -21,17 +21,6 @@ EFL_OPTION(ENABLE_VALGRIND "valgrind support" ${ENABLE_VALGRIND})
21 21
22SET_GLOBAL(EINA_MODULE_TYPE_MP_PASS_THROUGH_DEFAULT "STATIC") 22SET_GLOBAL(EINA_MODULE_TYPE_MP_PASS_THROUGH_DEFAULT "STATIC")
23 23
24# TODO: change code to avoid these
25if(EINA_MODULE_TYPE_MP_PASS_THROUGH STREQUAL "STATIC")
26 SET_GLOBAL(EINA_STATIC_BUILD_CHAINED_POOL 1)
27endif()
28if(EINA_MODULE_TYPE_MP_PASS_THROUGH STREQUAL "STATIC")
29 SET_GLOBAL(EINA_STATIC_BUILD_ONE_BIG 1)
30endif()
31if(EINA_MODULE_TYPE_MP_PASS_THROUGH STREQUAL "STATIC")
32 SET_GLOBAL(EINA_STATIC_BUILD_PASS_THROUGH 1)
33endif()
34
35#check for symbols in pthread 24#check for symbols in pthread
36#TODO Make the definitions depending on the platform 25#TODO Make the definitions depending on the platform
37set(CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}") 26set(CMAKE_REQUIRED_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
@@ -68,7 +57,3 @@ else()
68endif() 57endif()
69 58
70#Check if there is the alloca header 59#Check if there is the alloca header
71
72configure_file(
73 ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/eina/eina_config.h.cmake
74 ${CMAKE_CURRENT_BINARY_DIR}/src/lib/eina/eina_config.h)
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index cdf25771d8..71f8cfc1ab 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -726,6 +726,8 @@ function(EFL_LIB _target)
726 _EFL_LIB_PROCESS_MODULES_INTERNAL() 726 _EFL_LIB_PROCESS_MODULES_INTERNAL()
727 _EFL_LIB_PROCESS_TESTS_INTERNAL() 727 _EFL_LIB_PROCESS_TESTS_INTERNAL()
728 728
729 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/post/${_target}.cmake OPTIONAL)
730
729 LIST_APPEND_GLOBAL(EFL_ALL_LIBS ${_target}) 731 LIST_APPEND_GLOBAL(EFL_ALL_LIBS ${_target})
730endfunction() 732endfunction()
731 733
diff --git a/cmake/post/eina.cmake b/cmake/post/eina.cmake
new file mode 100644
index 0000000000..37be34d0b1
--- /dev/null
+++ b/cmake/post/eina.cmake
@@ -0,0 +1,21 @@
1
2# TODO: change code to avoid these
3if(EINA_MODULE_TYPE_MP_CHAINED STREQUAL "STATIC")
4 SET_GLOBAL(EINA_STATIC_BUILD_CHAINED_POOL 1)
5else()
6 unset(EINA_STATIC_BUILD_CHAINED_POOL CACHE)
7endif()
8if(EINA_MODULE_TYPE_MP_ONE_BIG STREQUAL "STATIC")
9 SET_GLOBAL(EINA_STATIC_BUILD_ONE_BIG 1)
10else()
11 unset(EINA_STATIC_BUILD_ONE_BIG CACHE)
12endif()
13if(EINA_MODULE_TYPE_MP_PASS_THROUGH STREQUAL "STATIC")
14 SET_GLOBAL(EINA_STATIC_BUILD_PASS_THROUGH 1)
15else()
16 unset(EINA_STATIC_BUILD_PASS_THROUGH CACHE)
17endif()
18
19configure_file(
20 ${CMAKE_CURRENT_SOURCE_DIR}/src/lib/eina/eina_config.h.cmake
21 ${CMAKE_CURRENT_BINARY_DIR}/src/lib/eina/eina_config.h)