Commit 1712cd0a authored by Brad King's avatar Brad King
Browse files

BUG: Fix ExportImport test on VS6

Visual Studio 6 does not support per-target object files, so just use two
separate source file names in this case.
parent ec5f5b09
......@@ -35,6 +35,12 @@ set_property(TARGET testLib3 PROPERTY SOVERSION 3)
add_library(testLib4 SHARED testLib4.c)
set_property(TARGET testLib4 PROPERTY FRAMEWORK 1)
# Work-around: Visual Studio 6 does not support per-target object files.
set(VS6)
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
set(VS6 1)
endif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 6")
# Test using the target_link_libraries command to set the
# LINK_INTERFACE_LIBRARIES* properties. We construct two libraries
# providing the same two symbols. In each library one of the symbols
......@@ -43,8 +49,8 @@ set_property(TARGET testLib4 PROPERTY FRAMEWORK 1)
# configuration in which it is built. If the proper library is not
# used via the link interface the import test will fail to link.
add_library(testLib4lib STATIC testLib4lib.c)
add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg.c)
add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt.c)
add_library(testLib4libdbg STATIC testLib4libopt.c testLib4libdbg${VS6}.c)
add_library(testLib4libopt STATIC testLib4libdbg.c testLib4libopt${VS6}.c)
set_property(TARGET testLib4libdbg PROPERTY COMPILE_DEFINITIONS LIB_DBG)
set_property(TARGET testLib4libopt PROPERTY COMPILE_DEFINITIONS LIB_OPT)
target_link_libraries(testLib4
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment