Skip to content

Commit

Permalink
share .cmake files
Browse files Browse the repository at this point in the history
  • Loading branch information
sguionni committed Nov 14, 2023
1 parent 07fb68f commit 0e452fa
Show file tree
Hide file tree
Showing 38 changed files with 52 additions and 376 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message("vtx")
cmake_minimum_required(VERSION 3.21)
include(cmake/configure-target.cmake)

project(vtx)

find_package(vtx_app CONFIG REQUIRED)
Expand All @@ -19,7 +19,7 @@ if(MSVC)
endif()

add_executable(vtx ${HEADERS} ${SOURCES} ${RESOURCES})
configureTarget(vtx)
configure_target(vtx)
target_include_directories(vtx PUBLIC include)

target_link_libraries(vtx PRIVATE vtx_app::vtx_app)
Expand Down
4 changes: 2 additions & 2 deletions lib/app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message("vtx_app")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_app)

find_package(vtx_util CONFIG REQUIRED)
Expand All @@ -10,7 +10,7 @@ find_package(vtx_io CONFIG REQUIRED)
find_package(EnTT REQUIRED)

add_library(vtx_app)
configureTarget(vtx_app)
configure_target(vtx_app)

file(GLOB_RECURSE HEADERS include/*)
file(GLOB_RECURSE SOURCES src/*)
Expand Down
19 changes: 0 additions & 19 deletions lib/app/cmake/configure-target.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion lib/app/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message("vtx_app_test")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_app_test)

find_package(vtx_util CONFIG REQUIRED)
Expand Down
19 changes: 0 additions & 19 deletions lib/app/test/cmake/configure-target.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions lib/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
message("vtx_core")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_core)

find_package(vtx_util CONFIG REQUIRED)

add_library(vtx_core STATIC ${HEADERS} ${SOURCES})
configureTarget(vtx_core)
configure_target(vtx_core)

file(GLOB_RECURSE HEADERS include/*)
file(GLOB_RECURSE SOURCES src/*)
Expand Down
19 changes: 0 additions & 19 deletions lib/core/cmake/configure-target.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions lib/io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
message("vtx_io")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_io)

find_package(vtx_util CONFIG REQUIRED)
find_package(vtx_core CONFIG REQUIRED)
find_package(chemfiles CONFIG REQUIRED)

add_library(vtx_io)
configureTarget(vtx_io)
configure_target(vtx_io)

file(GLOB_RECURSE HEADERS include/*)
file(GLOB_RECURSE SOURCES src/*)
Expand Down
19 changes: 0 additions & 19 deletions lib/io/cmake/configure-target.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions lib/io/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message("vtx_io_test")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_io_test)

find_package(vtx_util CONFIG REQUIRED)
Expand All @@ -9,7 +9,7 @@ find_package(vtx_io CONFIG REQUIRED)
find_package(Catch2 REQUIRED)

add_executable(vtx_io_test src/main.cpp)
configureTarget(vtx_io_test)
configure_target(vtx_io_test)

target_link_libraries(vtx_io_test PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_io_test PRIVATE vtx_core::vtx_core)
Expand Down
19 changes: 0 additions & 19 deletions lib/io/test/cmake/configure-target.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions lib/python_binding/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message("vtx_python_binding")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_python_binding)

find_package(vtx_util CONFIG REQUIRED)
Expand All @@ -10,7 +10,7 @@ find_package(vtx_io CONFIG REQUIRED)
find_package(pybind11 REQUIRED)

add_library(vtx_python_binding)
configureTarget(vtx_python_binding)
configure_target(vtx_python_binding)

file(GLOB_RECURSE HEADERS include/*)
file(GLOB_RECURSE SOURCES src/*)
Expand Down
19 changes: 0 additions & 19 deletions lib/python_binding/cmake/configure-target.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions lib/python_binding/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message("vtx_python_binding_test")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_python_binding_test)

find_package(vtx_util CONFIG REQUIRED)
Expand All @@ -13,7 +13,7 @@ find_package(Catch2 REQUIRED)

file(GLOB_RECURSE SOURCES src/*)
add_executable(vtx_python_binding_test ${SOURCES})
configureTarget(vtx_python_binding_test)
configure_target(vtx_python_binding_test)

target_link_libraries(vtx_python_binding_test PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_python_binding_test PRIVATE vtx_io::vtx_io)
Expand Down
19 changes: 0 additions & 19 deletions lib/python_binding/test/cmake/configure-target.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions lib/renderer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
message("vtx_renderer")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_renderer)

find_package(vtx_util CONFIG REQUIRED)

add_library(vtx_renderer)
configureTarget(vtx_renderer)
configure_target(vtx_renderer)

file(GLOB_RECURSE HEADERS include/*)
file(GLOB_RECURSE SOURCES src/*)
Expand Down
4 changes: 2 additions & 2 deletions lib/renderer/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
message("vtx_renderer_bench")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_renderer_bench)

find_package(vtx_util CONFIG REQUIRED)
Expand All @@ -14,7 +14,7 @@ file(GLOB_RECURSE SOURCES src/*)
file(GLOB_RECURSE VENDORS vendor/*)

add_executable(vtx_renderer_bench ${SOURCES} ${VENDORS})
configureTarget(vtx_renderer_bench)
configure_target(vtx_renderer_bench)

target_include_directories(vtx_renderer_bench PRIVATE vendor)

Expand Down
19 changes: 0 additions & 19 deletions lib/renderer/bench/cmake/configure-target.cmake

This file was deleted.

19 changes: 0 additions & 19 deletions lib/renderer/cmake/configure-target.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions lib/renderer/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
message("vtx_renderer_test")
cmake_minimum_required(VERSION 3.23)
include(cmake/configure-target.cmake)

project(vtx_renderer_test)

find_package(vtx_util CONFIG REQUIRED)
find_package(vtx_renderer CONFIG REQUIRED)
find_package(Catch2 REQUIRED)

add_executable(vtx_renderer_test src/main.cpp)
configureTarget(vtx_renderer_test)
configure_target(vtx_renderer_test)

target_link_libraries(vtx_renderer_test PRIVATE vtx_util::vtx_util)
target_link_libraries(vtx_renderer_test PRIVATE vtx_renderer::vtx_renderer)
Expand Down
19 changes: 0 additions & 19 deletions lib/renderer/test/cmake/configure-target.cmake

This file was deleted.

Loading

0 comments on commit 0e452fa

Please sign in to comment.