You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
636B

  1. execute_process(COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/ssl.p12 ${EXECUTABLE_OUTPUT_PATH}/)
  2. aux_source_directory(. TEST_SRC_LIST)
  3. foreach(TEST_SRC ${TEST_SRC_LIST})
  4. STRING(REGEX REPLACE "^\\./|\\.c[a-zA-Z0-9_]*$" "" TEST_EXE_NAME ${TEST_SRC})
  5. message(STATUS "添加测试程序:${TEST_EXE_NAME}")
  6. add_executable(${TEST_EXE_NAME} ${TEST_SRC})
  7. if(ANDROID OR IOS OR WIN32)
  8. target_link_libraries(${TEST_EXE_NAME} ${PROJECT_NAME}_static ${LINK_LIB_LIST})
  9. else()
  10. target_link_libraries(${TEST_EXE_NAME} ${PROJECT_NAME}_shared ${LINK_LIB_LIST} pthread)
  11. endif()
  12. endforeach(TEST_SRC ${TEST_SRC_LIST})