Skip to content

Commit

Permalink
build(install): propagate own cmake library, ref #180
Browse files Browse the repository at this point in the history
  • Loading branch information
iboB committed Nov 13, 2024
1 parent 36bdbe1 commit 2ed3c2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ac-local-config-export.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ if(WIN32 AND CMAKE_RUNTIME_OUTPUT_DIRECTORY)
)
endif()
endif()

# propagate the module path to package adders
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"@CMAKE_CURRENT_SOURCE_DIR@/cmake"
PARENT_SCOPE
)
2 changes: 2 additions & 0 deletions cmake/ac_local_lib.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) Alpaca Core
# SPDX-License-Identifier: MIT
#
include_guard(GLOBAL)

function(add_ac_local_lib target cname)
if(AC_LOCAL_STATIC)
add_library(${target} STATIC ${ARGN})
Expand Down
5 changes: 4 additions & 1 deletion cmake/ac_local_plugin_util.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright (c) Alpaca Core
# SPDX-License-Identifier: MIT
#
include_guard(GLOBAL)

include(ac_local_lib)

function(add_ac_local_plugin)
cmake_parse_arguments(ARG "" "NAME" "SOURCES;PLUGIN_SOURCES;PLIB_SOURCES;LIBRARIES" ${ARGN})
Expand Down Expand Up @@ -38,7 +41,7 @@ function(add_ac_local_plugin)
add_library(${baselibTargetName} STATIC
${ARG_SOURCES}
${privateName}-version.h
${ARG_NAME}-ac-local-interface.hpp
${ARG_NAME}-ac-local-interface.hpp
)
target_link_libraries(${baselibTargetName} PUBLIC
ac::local
Expand Down

0 comments on commit 2ed3c2b

Please sign in to comment.