Skip to content

Commit

Permalink
"consistent target link signatures in cmake; updates #255"
Browse files Browse the repository at this point in the history
  • Loading branch information
martukas committed Oct 14, 2021
1 parent 6477340 commit a5eae9d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
4 changes: 2 additions & 2 deletions source/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ target_link_libraries(

# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
PRIVATE $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)
PRIVATE $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)

11 changes: 8 additions & 3 deletions source/daqlite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ target_link_libraries(
PUBLIC fmt::fmt
PRIVATE RdKafka::rdkafka++
PRIVATE RdKafka::rdkafka
QPlot
QtColorWidgets
Qt5::Widgets
PRIVATE QPlot
PRIVATE QtColorWidgets
PRIVATE Qt5::Widgets
)

target_link_libraries(${this_target}
PRIVATE $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
PRIVATE $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)
20 changes: 10 additions & 10 deletions source/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ target_include_directories(

target_link_libraries(
${this_target}
${PROJECT_NAME}_core
${PROJECT_NAME}_producers
${PROJECT_NAME}_consumers
QPlot
QtColorWidgets
Qt5::Widgets
Qt5::PrintSupport
Qt5::Network
PRIVATE ${PROJECT_NAME}_core
PRIVATE ${PROJECT_NAME}_producers
PRIVATE ${PROJECT_NAME}_consumers
PRIVATE QPlot
PRIVATE QtColorWidgets
PRIVATE Qt5::Widgets
PRIVATE Qt5::PrintSupport
PRIVATE Qt5::Network
)

# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
PRIVATE $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>)
target_link_libraries(${this_target}
$<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)
PRIVATE $<$<AND:$<CXX_COMPILER_ID:AppleClang>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11.0>>:c++fs>)

0 comments on commit a5eae9d

Please sign in to comment.