1 2spec2def(dllexport_test_dll1.dll dllexport_test_dll1.spec ADD_IMPORTLIB) 3spec2def(dllexport_test_dll2.dll dllexport_test_dll2.spec ADD_IMPORTLIB) 4 5set(baseaddress_dllexport_test_dll1 0x1000000) 6 7add_library(dllexport_test_dll1 SHARED 8 dllexport_test_dll1.c 9 ${CMAKE_CURRENT_BINARY_DIR}/dllexport_test_dll1.def) 10 11set_module_type(dllexport_test_dll1 module) 12add_importlibs(dllexport_test_dll1 dllexport_test_dll2) 13 14set(baseaddress_dllexport_test_dll2 0x2000000) 15 16add_library(dllexport_test_dll2 SHARED 17 dllexport_test_dll2.c 18 ${CMAKE_CURRENT_BINARY_DIR}/dllexport_test_dll2.def) 19 20set_module_type(dllexport_test_dll2 module) 21 22add_executable(dllexport_test dllexport_test.c) 23set_module_type(dllexport_test win32cui) 24add_importlibs(dllexport_test dllexport_test_dll1 msvcrt kernel32 ntdll) 25 26if(MSVC) 27 add_compile_flags("/Zc:wchar_t-") 28endif() 29 30# framedyn is skipped in the clang-cl build 31if(NOT USE_CLANG_CL) 32 33add_library(dllimport_test SHARED dllimport_framedyn.cpp) 34set_module_type(dllimport_test module) 35add_importlibs(dllimport_test framedyn) 36 37if(NOT MSVC) 38 target_link_libraries(dllimport_test framedynex) 39endif() 40 41endif() 42