summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/AutoExportDll/AutoExport.cmake
blob: bdddb386fa3deacc483bf42ceb6123ed40fffc8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
project(autoexport)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${autoexport_BINARY_DIR}/bin)
add_subdirectory(sub)
add_library(autoexport SHARED hello.cxx world.cxx foo.c)

add_executable(say say.cxx)
if(MSVC)
  set_target_properties(say PROPERTIES ENABLE_EXPORTS ON)
  add_library(autoexport_for_exec SHARED hello2.c)
  target_link_libraries(autoexport_for_exec say)
endif()
target_link_libraries(say autoexport autoexport2)