magic_enum icon indicating copy to clipboard operation
magic_enum copied to clipboard

magic_enum/example/CMakeLists.txt

Open lglgdouble opened this issue 3 years ago • 2 comments

manual set(MAGIC_ENUM_OPT_BUILD_EXAMPLES ON)

target_link_libraries(${target} PRIVATE ${CMAKE_PROJECT_NAME})

target_link_libraries(${target} PRIVATE ${PROJECT_NAME}) ?

lglgdouble avatar May 23 '22 09:05 lglgdouble

Sorry, I didn't quite understand the question.

Neargye avatar May 23 '22 09:05 Neargye

an error occurs when I manually set the "set(MAGIC_ENUM_OPT_BUILD_EXAMPLES ON)"

[build] /home/cyc/self/ayaoho/3rdparty/magic_enum/example/example_custom_name.cpp:25:10: fatal error: magic_enum.hpp: No such file or directory [build] 25 | #include <magic_enum.hpp> [build] | ^~~~~~~~~~~~~~~~ [build] /home/cyc/self/ayaoho/3rdparty/magic_enum/example/enum_flag_example.cpp:26:10: fatal error: magic_enum.hpp: No such file or directory [build] 26 | #include <magic_enum.hpp> [build] | ^~~~~~~~~~~~~~~~

this is my magic_enum.cmake:

set(git_name magic_enum)

include(FetchContent)

FetchContent_Declare( ${git_name} SOURCE_DIR ${third_party_path}/${git_name} GIT_REPOSITORY https://${git_proxy}/Neargye/${git_name}.git GIT_TAG v0.8.0 )

set(MAGIC_ENUM_OPT_BUILD_EXAMPLES ON)

FetchContent_MakeAvailable(${git_name})

unset(git_name)

lglgdouble avatar May 24 '22 01:05 lglgdouble