CMakeLists.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. The ASF licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. #
  18. cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
  19. include_directories(
  20. ${CMAKE_CURRENT_SOURCE_DIR}/../libhdfs/include
  21. ${GENERATED_JAVAH}
  22. ${CMAKE_BINARY_DIR}
  23. ${CMAKE_CURRENT_SOURCE_DIR}/../libhdfs
  24. ${JNI_INCLUDE_DIRS}
  25. ${OS_DIR}
  26. ../libhdfspp/lib
  27. )
  28. add_library(native_mini_dfs
  29. native_mini_dfs.c
  30. ../libhdfs/exception.c
  31. ../libhdfs/jclasses.c
  32. ../libhdfs/jni_helper.c
  33. ${OS_DIR}/mutexes.c
  34. ${OS_DIR}/thread_local_storage.c
  35. )
  36. add_executable(test_native_mini_dfs test_native_mini_dfs.c)
  37. target_link_libraries(test_native_mini_dfs native_mini_dfs ${JAVA_JVM_LIBRARY})
  38. add_test(test_test_native_mini_dfs test_native_mini_dfs)