| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- function(build_boxing_module build_static_flag build_shared_flag module_name module_name_core source_files)
- include(${CMAKE_CURRENT_LIST_DIR}/cmake/Security.cmake)
- if (${build_static_flag})
- add_library("${${module_name}}" STATIC ${${source_files}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- if (${build_shared_flag})
- add_library("${${module_name}}" SHARED ${${source_files}})
- enable_strict_warnings(module_name)
- target_link_libraries("${${module_name}}" ${${module_name_core}})
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- endfunction()
- function(build_core_module build_static_flag build_shared_flag build_jni_flag module_name source_files jni_source_files)
- include(${CMAKE_CURRENT_LIST_DIR}/cmake/Security.cmake)
- if (${build_static_flag})
- add_library("${${module_name}}" STATIC ${${source_files}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- if (${build_shared_flag})
- if (${build_jni_flag})
- message("${${module_name}}: building with JNI...")
- add_library("${${module_name}}" SHARED ${${source_files}} ${${jni_source_files}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- else ()
- add_library("${${module_name}}" SHARED ${${source_files}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- endif ()
- endfunction()
- function(build_encoding_module build_static_flag build_shared_flag module_name module_name_core source_files)
- include(${CMAKE_CURRENT_LIST_DIR}/cmake/Security.cmake)
- if (${build_static_flag})
- add_library("${${module_name}}" STATIC ${${source_files}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- if (${build_shared_flag})
- add_library("${${module_name}}" SHARED ${${source_files}})
- enable_strict_warnings(module_name)
- target_link_libraries("${${module_name}}" ${${module_name_core}})
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- endfunction()
- function(build_event_module build_static_flag build_shared_flag module_name module_name_core source_files)
- include(${CMAKE_CURRENT_LIST_DIR}/cmake/Security.cmake)
- if (${build_static_flag})
- add_library("${${module_name}}" STATIC ${${source_files}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- if (${build_shared_flag})
- add_library("${${module_name}}" SHARED ${${source_files}})
- enable_strict_warnings(module_name)
- target_link_libraries("${${module_name}}" ${${module_name_core}})
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- endfunction()
- function(build_io_module build_static_flag build_shared_flag module_name module_name_core source_files)
- include(${CMAKE_CURRENT_LIST_DIR}/cmake/Security.cmake)
- if (${build_static_flag})
- add_library("${${module_name}}" STATIC ${${source_files}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- if (${build_shared_flag})
- add_library("${${module_name}}" SHARED ${${source_files}})
- enable_strict_warnings(module_name)
- target_link_libraries("${${module_name}}" ${${module_name_core}})
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- endfunction()
- function(build_time_module build_static_flag build_shared_flag build_jni_flag module_name module_name_core source_files source_files_linux source_files_windows source_files_jni)
- include(${CMAKE_CURRENT_LIST_DIR}/cmake/Security.cmake)
- if (${build_static_flag})
- add_library("${${module_name}}" STATIC ${${source_files}} ${${source_files_linux}} ${${source_files_windows}})
- enable_strict_warnings(module_name)
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- if (${build_shared_flag})
- if (${build_jni_flag})
- message("${${module_name}}: building with JNI...")
- add_library("${${module_name}}" SHARED ${${source_files}} ${${source_files_linux}} ${${source_files_windows}} ${${source_files_jni}})
- enable_strict_warnings(module_name)
- target_link_libraries("${${module_name}}" ${${module_name_core}})
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- else ()
- add_library("${${module_name}}" SHARED ${${source_files}} ${${source_files_linux}} ${${source_files_windows}})
- enable_strict_warnings(module_name)
- target_link_libraries("${${module_name}}" ${${module_name_core}})
- set_target_properties("${${module_name}}" PROPERTIES DEBUG_POSTFIX "-d")
- endif ()
- endif ()
- endfunction()
|