Skip to content

Commit

Permalink
cmake: Use CpuFeatures:: as TARGET namespace (Fix #333)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 14, 2023
1 parent b960bcf commit 982ae38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ target_include_directories(cpu_features
if(APPLE)
target_compile_definitions(cpu_features PRIVATE HAVE_SYSCTLBYNAME)
endif()
add_library(CpuFeature::cpu_features ALIAS cpu_features)
add_library(CpuFeatures::cpu_features ALIAS cpu_features)

#
# program : list_cpu_features
Expand All @@ -189,7 +189,7 @@ add_library(CpuFeature::cpu_features ALIAS cpu_features)
if(BUILD_EXECUTABLE)
add_executable(list_cpu_features ${PROJECT_SOURCE_DIR}/src/utils/list_cpu_features.c)
target_link_libraries(list_cpu_features PRIVATE cpu_features)
add_executable(CpuFeature::list_cpu_features ALIAS list_cpu_features)
add_executable(CpuFeatures::list_cpu_features ALIAS list_cpu_features)
endif()

#
Expand Down
2 changes: 1 addition & 1 deletion cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ or add cpu_features as a git-submodule in your project
2- You can then use the cmake command `add_subdirectory()` to include
cpu_features directly and use the `cpu_features` target in your project.

3- Add the `CpuFeature::cpu_features` target to the `target_link_libraries()` section of
3- Add the `CpuFeatures::cpu_features` target to the `target_link_libraries()` section of
your executable or of your library.

## Disabling tests
Expand Down

0 comments on commit 982ae38

Please sign in to comment.