Skip to content

Commit 46f67d4

Browse files
committed
Moving module install location back to under lib
1 parent ca2a05c commit 46f67d4

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

cmake/install.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include(CMakePackageConfigHelpers)
1212
install(TARGETS isptr EXPORT isptr FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
1313
install(EXPORT isptr NAMESPACE isptr:: FILE isptr-exports.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/isptr)
1414

15-
install(FILES ${SRCDIR}/modules/isptr.cppm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/intrusive_shared_ptr)
15+
install(FILES ${SRCDIR}/modules/isptr.cppm DESTINATION ${CMAKE_INSTALL_LIBDIR}/isptr)
1616

1717

1818
configure_package_config_file(

cmake/isptr-config.cmake.in

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,18 @@
1313
if(NOT TARGET isptr::isptr)
1414
include(${CMAKE_CURRENT_LIST_DIR}/isptr-exports.cmake)
1515

16-
get_filename_component(IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
17-
get_filename_component(IMPORT_PREFIX "${IMPORT_PREFIX}" PATH)
18-
get_filename_component(IMPORT_PREFIX "${IMPORT_PREFIX}" PATH)
19-
if(_IMPORT_PREFIX STREQUAL "/")
20-
set(IMPORT_PREFIX "")
21-
endif()
22-
23-
set(ISPTR_MODULES_BASE_DIRS "${IMPORT_PREFIX}/include/intrusive_shared_ptr")
24-
set(ISPTR_MODULES_FILES "${IMPORT_PREFIX}/include/intrusive_shared_ptr/isptr.cppm")
16+
get_filename_component(MYPATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
17+
18+
set(ISPTR_MODULES_BASE_DIRS "${MYPATH}")
19+
set(ISPTR_MODULES_FILES "${MYPATH}/isptr.cppm")
2520

2621
function(isptr_add_module target_name visibility)
2722
target_sources(${target_name} ${visibility}
2823
FILE_SET isptr_module TYPE CXX_MODULES BASE_DIRS ${ISPTR_MODULES_BASE_DIRS} FILES ${ISPTR_MODULES_FILES}
2924
)
3025
endfunction()
3126

32-
set(IMPORT_PREFIX)
27+
set(MYPATH)
3328

3429
endif()
3530

0 commit comments

Comments
 (0)