generated from TheLartians/ModernCppStarter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[globle] change directory architecture
- Loading branch information
yangli
committed
Sep 16, 2022
1 parent
0242eac
commit fce7c31
Showing
5 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,14 +33,14 @@ include(../cmake/CPM.cmake) | |
# PackageProject.cmake will be used to make our target installable | ||
CPMAddPackage("gh:TheLartians/[email protected]") | ||
|
||
find_package(Boost REQUIRED) | ||
find_package(Boost REQUIRED COMPONENTS system iostreams) | ||
|
||
# ---- Add source files ---- | ||
|
||
# Note: globbing sources is considered bad practice as CMake's generators may not detect new files | ||
# automatically. Keep that in mind when changing files, or explicitly mention them here. | ||
file(GLOB_RECURSE headers CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../include/*.hpp") | ||
file(GLOB_RECURSE sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../source/*.cpp") | ||
file(GLOB_RECURSE headers CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp") | ||
file(GLOB_RECURSE sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp") | ||
|
||
# ---- Create library ---- | ||
|
||
|
@@ -53,10 +53,10 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20) | |
target_compile_options(${PROJECT_NAME} PUBLIC "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive->") | ||
|
||
# Link dependencies | ||
target_link_libraries(${PROJECT_NAME} PUBLIC spdlog::spdlog Boost::boost boost_iostreams) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC spdlog::spdlog Boost::boost Boost::iostreams) | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/../include> | ||
${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}-${PROJECT_VERSION}> | ||
) | ||
|
||
|
@@ -72,7 +72,7 @@ packageProject( | |
VERSION ${PROJECT_VERSION} | ||
NAMESPACE ${PROJECT_NAME} | ||
BINARY_DIR ${PROJECT_BINARY_DIR} | ||
INCLUDE_DIR . | ||
INCLUDE_DIR include | ||
INCLUDE_DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION} | ||
VERSION_HEADER "${VERSION_HEADER_LOCATION}" | ||
COMPATIBILITY SameMajorVersion | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
#include <boss/fq_utils.hpp> | ||
#include "boss/fq_utils.hpp" | ||
|
||
namespace boss::fqsp {} // namespace boss::fqsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ CPMAddPackage("gh:TheLartians/[email protected]") | |
if(TEST_INSTALLED_VERSION) | ||
find_package(boss REQUIRED) | ||
else() | ||
CPMAddPackage(NAME boss SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../include) | ||
CPMAddPackage(NAME boss SOURCE_DIR ../library/include) | ||
endif() | ||
|
||
# ---- Create binary ---- | ||
|