Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,33 @@ if(NOT WIN32 AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()
endif()

# Allow inclusion via FetchContent
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(BUILDING_BANKID_PROJECT ON)
else()
set(BUILDING_BANKID_PROJECT OFF)
endif()


if(BUILDING_BANKID_PROJECT)
if(NOT WIN32 AND NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/opt/${PROJECT_NAME}")
endif()
endif()

option(BUILD_SHARED_LIBS "Build shared library" Off)

# option(BUILD_TESTS "Build tests" On)

add_subdirectory(bankid)
add_subdirectory(server)

if(BUILD_TESTS)
add_subdirectory(tests)
# Only add demo server and tests in standalone builds
if(BUILDING_BANKID_PROJECT)
add_subdirectory(server)

if(BUILD_TESTS)
add_subdirectory(tests)
endif()
endif()


Loading