Skip to content

Commit

Permalink
Move build system specific directories to root
Browse files Browse the repository at this point in the history
  • Loading branch information
aradi authored May 19, 2024
1 parent f9decd5 commit 0f25712
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# matches a path and the corresponding boolean value is False, the path is removed.
OPTIONAL_PATHS = [
(r"./app$", WITH_APP),
(r"./config/cmake$", CMAKE_BUILD),
(r"./config/meson$", MESON_BUILD),
(r"./cmake$", CMAKE_BUILD),
(r"./meson$", MESON_BUILD),
(r"./example$", WITH_EXAMPLE),
(r"./subprojects$", CMAKE_BUILD or MESON_BUILD),
(r"./subprojects/Fortuno.cmake$", CMAKE_BUILD and SERIAL_CODE),
Expand Down
6 changes: 3 additions & 3 deletions {{ cookiecutter.project_slug }}/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ include(FetchContent)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/config/cmake)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include({{cookiecutter.project_name}}Helpers)

set(BUILD_SHARED_LIBS ${{'{'}}{{cookiecutter.__project_slug_upper}}_BUILD_SHARED_LIBS})
Expand Down Expand Up @@ -131,7 +131,7 @@ endif ()
if ({{cookiecutter.__project_slug_upper}}_INSTALL)

# pkg-config files
configure_file(config/cmake/{{cookiecutter.project_slug}}.pc.in {{cookiecutter.project_slug}}.pc @ONLY)
configure_file(cmake/{{cookiecutter.project_slug}}.pc.in {{cookiecutter.project_slug}}.pc @ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/{{cookiecutter.project_slug}}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
Expand All @@ -145,7 +145,7 @@ if ({{cookiecutter.__project_slug_upper}}_INSTALL)
COMPATIBILITY SameMajorVersion
)
configure_package_config_file(
config/cmake/{{cookiecutter.project_name}}Config.cmake.in
cmake/{{cookiecutter.project_name}}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/{{cookiecutter.project_name}}Config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/{{cookiecutter.project_name}}
)
Expand Down
2 changes: 1 addition & 1 deletion {{ cookiecutter.project_slug }}/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ project(
# based projects would not be able to find the installed module files then.
module_dir_name = get_option('install_module_dir')
install_modules_dir = join_paths(get_option('includedir'), module_dir_name)
install_modules_script = find_program(files(join_paths('config', 'meson', 'install-modules.py')))
install_modules_script = find_program(files(join_paths('meson', 'install-modules.py')))

{% if cookiecutter.__coarray_code == "True" -%}
coarray_compile_flags = get_option('coarray_compile_flags')
Expand Down

0 comments on commit 0f25712

Please sign in to comment.