summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install/PRE_POST_INSTALL_SCRIPT.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/install/PRE_POST_INSTALL_SCRIPT.cmake')
-rw-r--r--Tests/RunCMake/install/PRE_POST_INSTALL_SCRIPT.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/install/PRE_POST_INSTALL_SCRIPT.cmake b/Tests/RunCMake/install/PRE_POST_INSTALL_SCRIPT.cmake
new file mode 100644
index 0000000..357c688
--- /dev/null
+++ b/Tests/RunCMake/install/PRE_POST_INSTALL_SCRIPT.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+
+add_executable(myexe main.c)
+set_property(TARGET myexe PROPERTY PRE_INSTALL_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/preinstall.cmake")
+set_property(TARGET myexe PROPERTY POST_INSTALL_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/postinstall.cmake")
+
+install(TARGETS myexe DESTINATION bin)