Skip to content

Commit 34f83ad

Browse files
committed
Added a "deploy-like" step on POST_BUILD.
1 parent d7934d2 commit 34f83ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ endif()
4444

4545
option(QSQLCIPHER_STATIC "Build plugin as a static library" OFF)
4646
option(QSQLCIPHER_BUILD_TESTS "Build the test binary" ON)
47+
set(QSQLCIPHER_COPYTO_DIR "" CACHE PATH "If set, the build artifact of the library will be copied there")
4748

4849
set(CMAKE_CXX_STANDARD 14)
4950
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -106,6 +107,10 @@ target_link_libraries(qsqlcipher
106107
${SQLCIPHER_LIBRARIES} ${Libsqlcipher_LIBRARIES}
107108
)
108109

110+
if (NOT ("${QSQLCIPHER_COPYTO_DIR}" STREQUAL ""))
111+
add_custom_command(TARGET qsqlcipher POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:qsqlcipher> ${QSQLCIPHER_COPYTO_DIR}/$<TARGET_FILE_NAME:qsqlcipher>)
112+
endif()
113+
109114
#include(CTest)
110115
if(QSQLCIPHER_BUILD_TESTS)
111116
add_subdirectory(${TEST_DIR})

0 commit comments

Comments
 (0)