tesseroids/test/CMakeLists.txt

13 lines
388 B
CMake
Raw Permalink Normal View History

2021-05-05 10:58:03 +08:00
# 设置编译选项
2021-08-28 11:33:30 +08:00
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
2021-05-07 09:41:30 +08:00
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
2021-08-28 11:33:30 +08:00
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lm")
2021-05-05 10:58:03 +08:00
endif()
# 设置可执行文件的输出地址
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/test)
# 添加可执行程序名称
add_executable(test_all test_all.c)
# 链接动态库
2021-05-05 15:24:52 +08:00
target_link_libraries(test_all PUBLIC tess)