File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11link_compile_commands(compile_commands.json)
22
3- file (GLOB_RECURSE SOURCE_FILES " ${CMAKE_SOURCE_DIR} /src/*.cpp" )
4- list (REMOVE_ITEM SOURCE_FILES ${MAIN} )
5- add_dummy_source( SOURCE_FILES )
3+ add_library ( ${OBJLIB_NAME} OBJECT
4+ ${CMAKE_CURRENT_SOURCE_DIR} /factorial.cpp
5+ )
66
7-
8- add_library ( ${OBJLIB_NAME} OBJECT ${SOURCE_FILES} )
9- target_include_directories ( ${OBJLIB_NAME} PUBLIC ${CMAKE_SOURCE_DIR} /src)
10- target_include_directories ( ${OBJLIB_NAME} PUBLIC " ${CMAKE_BINARY_DIR} /project_config/include" )
7+ target_sources ( ${OBJLIB_NAME} PUBLIC FILE_SET HEADERS BASE_DIRS
8+ ${CMAKE_SOURCE_DIR} /src
9+ ${CMAKE_BINARY_DIR} /project_config/ include
10+ )
1111
1212find_package (fmt CONFIG REQUIRED)
1313target_link_libraries (${OBJLIB_NAME} PUBLIC fmt::fmt)
You can’t perform that action at this time.
0 commit comments