-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add export config for find_package, ref #180
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (c) Borislav Stanimirov | ||
# SPDX-License-Identifier: MIT | ||
# | ||
include(${CMAKE_CURRENT_LIST_DIR}/ac-local-targets.cmake) | ||
message(STATUS "ac-local dev @CMAKE_BUILD_TYPE@ found in ${CMAKE_CURRENT_LIST_DIR}") | ||
|
||
if(WIN32 AND CMAKE_RUNTIME_OUTPUT_DIRECTORY) | ||
# on windows we need to have the dlls in the runtime directory | ||
# so that the executables can find them | ||
if(NOT EXISTS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ac-local.dll) | ||
# we're making symlinks, so only do it once | ||
file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) | ||
execute_process( | ||
COMMAND ${CMAKE_COMMAND} -E create_symlink | ||
${CMAKE_CURRENT_LIST_DIR}/bin/ac-local.dll | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ac-local.dll | ||
COMMAND ${CMAKE_COMMAND} -E create_symlink | ||
${CMAKE_CURRENT_LIST_DIR}/bin/ac-jalog.dll | ||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ac-jalog.dll | ||
COMMAND_ERROR_IS_FATAL ANY | ||
) | ||
endif() | ||
endif() |