Skip to content

Commit

Permalink
Merge pull request #72 from Rossmaxx/msvc-fix
Browse files Browse the repository at this point in the history
Fixes to MSVC support for ci branch.
  • Loading branch information
JohannesLorenz committed Jan 14, 2024
2 parents 47a6632 + 81bed3a commit fbd518f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ else()
endif(FLTK_FOUND)

if(MSVC)
find_package(LIBLO)
find_package(liblo)
if(liblo_FOUND)
set(LIBLO_FOUND TRUE)
endif()
else()
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
Expand Down Expand Up @@ -185,8 +188,7 @@ maketest(message-alignment)
maketest(test-arg-iter)
if(LIBLO_FOUND)
maketest(liblo)
target_include_directories(liblo PRIVATE ${LIBLO_INCLUDE_DIRS})
target_link_libraries(liblo PRIVATE ${LIBLO_LIBRARIES})
target_link_libraries(liblo PRIVATE liblo::liblo)
endif()

maketestcpp(version)
Expand All @@ -206,8 +208,7 @@ maketestcpp(path-search)

maketestcpp(performance)
if(LIBLO_FOUND)
target_include_directories(performance PRIVATE ${LIBLO_INCLUDE_DIRS})
target_link_libraries(performance PRIVATE ${LIBLO_LIBRARIES})
target_link_libraries(performance PRIVATE liblo::liblo)
target_compile_definitions(performance PRIVATE HAVE_LIBLO)
endif()

Expand All @@ -224,8 +225,8 @@ maketestcpp(test-automation)

if(LIBLO_FOUND)
add_library(lo-server test/liblo-server.cpp)
target_include_directories(lo-server PRIVATE ${LIBLO_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(lo-server PRIVATE ${LIBLO_LIBRARIES} rtosc-cpp rtosc)
target_include_directories(lo-server PRIVATE ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(lo-server PRIVATE liblo::liblo)
set(RTOSC_TEST_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test CACHE INTERNAL "")
set(RTOSC_TEST_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "")
endif()
Expand Down
2 changes: 1 addition & 1 deletion test/performance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>

#ifdef HAVE_LIBLO
#include <lo/lo_lowlevel.h>
#include <lo/lo.h>
#endif

#include <rtosc/rtosc.h>
Expand Down

0 comments on commit fbd518f

Please sign in to comment.