mirror of
https://github.com/guezoloic/t3dsr.git
synced 2026-01-25 10:34:23 +00:00
fix(cmakelists.txt): remove -lm for msvc compilation
This commit is contained in:
@@ -7,7 +7,10 @@ file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.c)
|
|||||||
file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS src/*.h)
|
file(GLOB_RECURSE HEADERS CONFIGURE_DEPENDS src/*.h)
|
||||||
|
|
||||||
add_executable(main ${SOURCES} ${HEADERS})
|
add_executable(main ${SOURCES} ${HEADERS})
|
||||||
target_link_libraries(main m)
|
if(NOT MSVC)
|
||||||
|
target_link_libraries(main m)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# ==== tests ====
|
# ==== tests ====
|
||||||
enable_testing()
|
enable_testing()
|
||||||
@@ -17,6 +20,8 @@ list(FILTER SOURCES EXCLUDE REGEX ".*src/main\\.c$")
|
|||||||
|
|
||||||
if(TEST_SOURCES)
|
if(TEST_SOURCES)
|
||||||
add_executable(tests ${TEST_SOURCES} ${SOURCES})
|
add_executable(tests ${TEST_SOURCES} ${SOURCES})
|
||||||
|
if(NOT MSVC)
|
||||||
target_link_libraries(tests m)
|
target_link_libraries(tests m)
|
||||||
|
endif()
|
||||||
add_test(NAME tests COMMAND tests)
|
add_test(NAME tests COMMAND tests)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user