Skip to content

Commit

Permalink
Fixes for building on windows (#47)
Browse files Browse the repository at this point in the history
Don't link to pthread on windows
Define a symbol instead of an int, MVSC can't see it as a constant.

Signed-off-by: Félix Bourbonnais <[email protected]>
  • Loading branch information
BadSingleton authored Mar 24, 2023
1 parent f54f987 commit 72bdee3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ foreach(TEST ${TESTS})
cmocka
copentime
copentimelineio
pthread)
)

if (WIN32)
# don't link pthread
else()
target_link_libraries(C${TEST} PUBLIC
pthread
)
endif()
target_compile_definitions(C${TEST} PRIVATE
SAMPLE_DATA_DIR=${CMAKE_CURRENT_SOURCE_DIR}/sample_data/)
add_test(NAME C${TEST} COMMAND C${TEST})
Expand Down
2 changes: 1 addition & 1 deletion tests/OTIOCompositionTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -2058,7 +2058,7 @@ static void otio_nesting_deeply_nesting_test(void **state) {
assert_true(RationalTime_equal(stack_transformed_time_fifty_clip, middle));
assert_true(RationalTime_equal(stack_transformed_time_ninetynine_clip, last));

int num_wrappers = 10;
#define num_wrappers 10
Stack *wrappers[num_wrappers];
struct ClipWrapperPair clipWrapperPair;
clipWrapperPair.clip = clip;
Expand Down

0 comments on commit 72bdee3

Please sign in to comment.