Skip to content

Commit

Permalink
[cmake] internal target split
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoisCarouge committed Oct 5, 2024
1 parent b10bb8c commit 8f044f7
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 13 deletions.
16 changes: 3 additions & 13 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org> ]]

# @todo Add an internal CMakeLists file to simplify and separate this one.
add_library(kalman INTERFACE)
target_link_libraries(kalman INTERFACE kalman_internal)
target_sources(
kalman
INTERFACE FILE_SET
Expand All @@ -46,18 +46,6 @@ target_sources(
"HEADERS"
FILES
"fcarouge/algorithm.hpp"
"fcarouge/internal/factory.hpp"
"fcarouge/internal/format.hpp"
"fcarouge/internal/function.hpp"
"fcarouge/internal/kalman.tpp"
"fcarouge/internal/type.hpp"
"fcarouge/internal/utility.hpp"
"fcarouge/internal/x_z_p_q_r_h_f.hpp"
"fcarouge/internal/x_z_p_q_r_hh_us_ps.hpp"
"fcarouge/internal/x_z_p_qq_rr_f.hpp"
"fcarouge/internal/x_z_p_r_f.hpp"
"fcarouge/internal/x_z_u_p_q_r_f_g_ps.hpp"
"fcarouge/internal/x_z_u_p_q_r_us_ps.hpp"
"fcarouge/kalman.hpp"
"fcarouge/utility.hpp")
install(
Expand All @@ -71,3 +59,5 @@ install(
if(NOT TARGET kalman::kalman)
add_library(kalman::kalman ALIAS kalman)
endif()

add_subdirectory(fcarouge)
62 changes: 62 additions & 0 deletions include/fcarouge/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#[[ __ _ __ __ _ _
| |/ / /\ | | | \/ | /\ | \ | |
| ' / / \ | | | \ / | / \ | \| |
| < / /\ \ | | | |\/| | / /\ \ | . ` |
| . \ / ____ \| |____| | | |/ ____ \| |\ |
|_|\_\/_/ \_\______|_| |_/_/ \_\_| \_|
Kalman Filter
Version 0.4.0
https://github.com/FrancoisCarouge/Kalman
SPDX-License-Identifier: Unlicense
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org> ]]

add_library(kalman_internal INTERFACE)
target_sources(
kalman_internal
INTERFACE FILE_SET
"kalman_headers"
TYPE
"HEADERS"
FILES
"internal/factory.hpp"
"internal/format.hpp"
"internal/function.hpp"
"internal/kalman.tpp"
"internal/type.hpp"
"internal/utility.hpp"
"internal/x_z_p_q_r_h_f.hpp"
"internal/x_z_p_q_r_hh_us_ps.hpp"
"internal/x_z_p_qq_rr_f.hpp"
"internal/x_z_p_r_f.hpp"
"internal/x_z_u_p_q_r_f_g_ps.hpp"
"internal/x_z_u_p_q_r_us_ps.hpp")
install(
TARGETS kalman_internal
EXPORT "kalman-target"
FILE_SET "kalman_headers")

0 comments on commit 8f044f7

Please sign in to comment.