| --- libmysofa-0.6/src/CMakeLists.txt.orig 2018-02-02 11:43:26.245124100 +0300 |
| +++ libmysofa-0.6/src/CMakeLists.txt 2018-02-02 11:44:38.413003700 +0300 |
| @@ -18,7 +18,13 @@ |
| endif() |
| include(FindZLIB) |
| include_directories(${ZLIB_INCLUDE_DIRS}) |
| + if(MINGW) |
| + if (MATH_FOUND) |
| + SET(PKG_CONFIG_PRIVATELIBS "${MATH_LIBRARIES} ${PKG_CONFIG_PRIVATELIBS}") |
| + endif() |
| + else() |
| set(PKG_CONFIG_PRIVATELIBS "-lm ${PKG_CONFIG_PRIVATELIBS}") |
| + endif() |
| set(PKG_CONFIG_PRIVATELIBS "-lz ${PKG_CONFIG_PRIVATELIBS}") |
| else() |
| set(MATH "") |
| @@ -35,6 +35,7 @@ |
| mysofa-static |
| PROPERTIES OUTPUT_NAME mysofa CLEAN_DIRECT_OUTPUT 1 POSITION_INDEPENDENT_CODE |
| ON) |
| +target_compile_definitions(mysofa-static PUBLIC MYSOFA_STATIC_DEFINE) |
| install(TARGETS mysofa-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| |
| if(UNIX |
| @@ -66,7 +66,7 @@ |
| COMMAND external) |
| |
| add_executable(internal tests/internal.c tests/tools.c hrtf/tools.c) |
| - target_link_libraries(internal m ${CUNIT_LIBRARIES}) |
| + target_link_libraries(internal mysofa-static ${CUNIT_LIBRARIES}) |
| add_test( |
| NAME internal |
| WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |