Skip to content

Commit

Permalink
Updated CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorpool committed Apr 18, 2023
1 parent daf5336 commit 5ad6ec6
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,42 @@ include(FetchContent)
FetchContent_Declare(
Sabai
GIT_REPOSITORY [email protected]:taylorpool/sabai.git
GIT_TAG constexpr
GIT_TAG main
)
FetchContent_MakeAvailable(Sabai)

add_library(onogawa
src/onogawa.cpp
)
add_library(onogawa INTERFACE)
target_include_directories(onogawa
PUBLIC
INTERFACE
include
)
target_link_libraries(onogawa
INTERFACE
sabai
)

option(BUILD_Onogawa_TESTS "Build Onogawa Tests" OFF)

if(BUILD_Onogawa_TESTS)
find_package(GTest REQUIRED)
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.13.0
)
FetchContent_MakeAvailable(googletest)

enable_testing()

add_executable(test_onogawa
test/test_onogawa.cpp
test/test_quaternion.cpp
)
target_link_libraries(test_onogawa
onogawa
GTest::GTest
GTest::Main
GTest::gtest_main
)

include(GoogleTest)
gtest_discover_tests(test_onogawa)

Expand Down

0 comments on commit 5ad6ec6

Please sign in to comment.