Skip to content

Commit 4e821e1

Browse files
committed
Update CMakeLists.txt
1 parent 2623621 commit 4e821e1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/conan_cmake/library/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,22 @@ configure_package_config_file(
4040
install(
4141
TARGETS mathutils
4242
EXPORT mathutilsTargets
43+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
44+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
4345
FILE_SET CXX_MODULES
44-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mathutils/src
46+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mathutils
4547
)
4648

49+
# Create empty include directory to satisfy CMake's exported target requirements
50+
# (module-only library with no headers, but CMake expects the directory to exist)
51+
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
52+
4753
# Export and package configuration
4854
install(
4955
EXPORT mathutilsTargets
5056
FILE mathutilsTargets.cmake
5157
NAMESPACE mathutils::
5258
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/mathutils
53-
CXX_MODULES_DIRECTORY cxx-modules
5459
)
5560

5661
install(

0 commit comments

Comments
 (0)