Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 3.4)
- project(FooBar)
- file(WRITE myexe.cpp [[
- __declspec(dllimport) void foo();
- int main() { foo(); }
- ]])
- add_executable(myexe myexe.cpp)
- target_link_libraries(myexe PRIVATE mylib)
- file(WRITE mylib.cpp "__declspec(dllexport) void foo() {}")
- add_library(mylib SHARED mylib.cpp)
- set_property(TARGET mylib PROPERTY DEBUG_POSTFIX d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement