summaryrefslogtreecommitdiff
path: root/inject/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'inject/CMakeLists.txt')
-rw-r--r--inject/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/inject/CMakeLists.txt b/inject/CMakeLists.txt
index 0b556502..6c24370d 100644
--- a/inject/CMakeLists.txt
+++ b/inject/CMakeLists.txt
@@ -8,6 +8,16 @@ add_library (injectee MODULE
set_target_properties (injectee PROPERTIES
PREFIX ""
)
+if (MSVC)
+ set_target_properties (injectee PROPERTIES LINK_FLAGS "/ENTRY:DllMainStartup")
+else ()
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set_target_properties (injectee PROPERTIES LINK_FLAGS "-Wl,--entry=_DllMainStartup@12")
+ else ()
+ set_target_properties (injectee PROPERTIES LINK_FLAGS "-Wl,--entry=DllMainStartup")
+ endif ()
+endif ()
+
install (TARGETS injectee LIBRARY DESTINATION bin)
install_pdb (injectee DESTINATION bin)