Skip to content

Commit

Permalink
Win:OK! Make Catch2 always static. Remove Cairo test on win.
Browse files Browse the repository at this point in the history
  • Loading branch information
crupest committed Oct 16, 2023
1 parent fe1daee commit e373b62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,24 @@ if (EMSCRIPTEN)
set(CRU_DEFAULT_BUILD_SHARED_LIBS OFF)
endif()

option(BUILD_SHARED_LIBS "Try to build shared libraries as default" ${CRU_DEFAULT_BUILD_SHARED_LIBS})
option(CRU_BUILD_SHARED_LIBS "Try to build shared libraries as default" ${CRU_DEFAULT_BUILD_SHARED_LIBS})

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS OFF)

set(BUILD_SHARED_LIBS ${CRU_BUILD_SHARED_LIBS})

project(cru)

if (APPLE)
include_directories(BEFORE SYSTEM "/usr/local/include")
endif()

# Catch2 must be compiled as static library
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(lib/Catch2)
set(BUILD_SHARED_LIBS ${CRU_BUILD_SHARED_LIBS})

add_subdirectory(lib/double-conversion)
add_subdirectory(lib/GSL)

Expand Down
8 changes: 5 additions & 3 deletions demos/Graphics/DrawCircle/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
add_executable(CruDemoGraphicsDrawCircle DrawCircle.cpp PlatformMain.cpp)
add_executable(CruDemoGraphicsDrawCircleCairo DrawCircle.cpp CairoMain.cpp)

target_link_libraries(CruDemoGraphicsDrawCircle PRIVATE CruDemoBase)
target_link_libraries(CruDemoGraphicsDrawCircleCairo PRIVATE CruDemoBase CruPlatformGraphicsCairo)

if(TARGET CruPlatformGraphicsCairo)
add_executable(CruDemoGraphicsDrawCircleCairo DrawCircle.cpp CairoMain.cpp)
target_link_libraries(CruDemoGraphicsDrawCircleCairo PRIVATE CruDemoBase CruPlatformGraphicsCairo)
endif()

0 comments on commit e373b62

Please sign in to comment.