File tree 4 files changed +16
-4
lines changed
4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ if(MSVC)
12
12
endif ()
13
13
14
14
add_executable (${target} ${srcs} ${hdrs} )
15
- target_link_libraries (${target} gtest opencv_ptest ${LIBRARY} ${CMAKE_THREAD_LIBS_INIT} pthread)
15
+ if (UNIX )
16
+ target_link_libraries (${target} ${CMAKE_THREAD_LIBS_INIT} pthread)
17
+ endif (UNIX )
18
+ target_link_libraries (${target} gtest opencv_ptest ${LIBRARY} )
16
19
17
20
add_custom_command (
18
21
TARGET ${target}
Original file line number Diff line number Diff line change @@ -6,5 +6,8 @@ foreach(app_filename ${app_list})
6
6
get_filename_component (app ${app_filename} NAME_WE )
7
7
# Add and configure executable file to be produced
8
8
add_executable (${app} ${app_filename} )
9
- target_link_libraries (${app} ${LIBRARY_DEPS} ${CMAKE_THREAD_LIBS_INIT} )
9
+ if (UNIX )
10
+ target_link_libraries (${target} ${app} ${CMAKE_THREAD_LIBS_INIT} )
11
+ endif (UNIX )
12
+ target_link_libraries (${target} ${app} ${LIBRARY_DEPS} )
10
13
endforeach ()
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ file(GLOB hdrs "*.h*")
4
4
file (GLOB srcs "*.cpp" )
5
5
6
6
add_library (${target} STATIC ${srcs} ${hdrs} )
7
- target_link_libraries (${target} ${LIBRARY_DEPS} ${CMAKE_THREAD_LIBS_INIT} )
7
+ if (UNIX )
8
+ target_link_libraries (${target} ${CMAKE_THREAD_LIBS_INIT} )
9
+ endif (UNIX )
10
+ target_link_libraries (${target} ${LIBRARY_DEPS} )
8
11
9
12
set (LIBRARY_DEPS "${LIBRARY_DEPS} ;${target} " PARENT_SCOPE)
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ if(MSVC)
12
12
endif ()
13
13
14
14
add_executable (${target} ${srcs} ${hdrs} )
15
- target_link_libraries (${target} gtest ${LIBRARY} ${CMAKE_THREAD_LIBS_INIT} pthread)
15
+ if (UNIX )
16
+ target_link_libraries (${target} gtest ${CMAKE_THREAD_LIBS_INIT} pthread)
17
+ endif (UNIX )
18
+ target_link_libraries (${target} gtest ${LIBRARY} )
16
19
17
20
add_custom_command (
18
21
TARGET ${target}
You can’t perform that action at this time.
0 commit comments