diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d1a7dfd9..2863b648d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,7 @@ option(SAIL_BUILD_TESTS "Build tests." ON) option(SAIL_DEV "Enable developer mode. Be more strict when compiling source code, for example." OFF) set(SAIL_EXCEPT_CODECS "" CACHE STRING "Disable the codecs specified in this ';'-separated list. \ A codec specified in this setting remains disabled even if it's also specified in SAIL_ONLY_CODECS.") +option(SAIL_INSTALL_PDB "Install PDB files along with libraries." ON) set(SAIL_ONLY_CODECS "" CACHE STRING "Enable only the codecs specified in this ';'-separated list. \ Codecs with missing dependencies will be disabled regardless this setting.") option(BUILD_SHARED_LIBS "Build shared libs. When disabled, sets SAIL_COMBINE_CODECS to ON." ON) @@ -299,11 +300,12 @@ message("* Shared build: ${BUILD_SHARED_LIBS}") message("* Combine codecs [*]: ${SAIL_COMBINE_CODECS}") message("* Thread-safe: ${SAIL_THREAD_SAFE}") message("* SAIL_THIRD_PARTY_CODECS_PATH: ${SAIL_THIRD_PARTY_CODECS_PATH}") +message("* Colored output: ${SAIL_COLORED_OUTPUT}${SAIL_COLORED_OUTPUT_CLARIFY}") message("* Build apps: ${SAIL_BUILD_APPS}") message("* Build examples: ${SAIL_BUILD_EXAMPLES}") message("* Build SDL example: ${SAIL_SDL_EXAMPLE}") message("* Build tests: ${SAIL_BUILD_TESTS}") -message("* Colored output: ${SAIL_COLORED_OUTPUT}${SAIL_COLORED_OUTPUT_CLARIFY}") +message("* Install PDB files: ${SAIL_INSTALL_PDB}") message("*") message("* [*] - these options depend on other options, their values may be altered by CMake.") message("* For example, if you configure with -DBUILD_SHARED_LIBS=OFF -DSAIL_COMBINE_CODECS=OFF,") diff --git a/examples/c/sail/CMakeLists.txt b/examples/c/sail/CMakeLists.txt index c195f0a89..5484bac21 100644 --- a/examples/c/sail/CMakeLists.txt +++ b/examples/c/sail/CMakeLists.txt @@ -16,7 +16,9 @@ sail_enable_asan(TARGET sail-app) # Install PDB # -sail_install_pdb(TARGET sail-app RENAME sail.app.pdb) +if (SAIL_INSTALL_PDB) + sail_install_pdb(TARGET sail-app RENAME sail.app.pdb) +endif() # Installation # diff --git a/src/bindings/c++/CMakeLists.txt b/src/bindings/c++/CMakeLists.txt index dc6a50c5a..ce96036b5 100644 --- a/src/bindings/c++/CMakeLists.txt +++ b/src/bindings/c++/CMakeLists.txt @@ -95,7 +95,9 @@ sail_enable_asan(TARGET sail-c++) sail_enable_pch(TARGET sail-c++ HEADER sail-c++.h) -sail_install_pdb(TARGET sail-c++) +if (SAIL_INSTALL_PDB) + sail_install_pdb(TARGET sail-c++) +endif() # Definitions, includes, link # diff --git a/src/libsail-common/CMakeLists.txt b/src/libsail-common/CMakeLists.txt index 6d5b1ab99..6182ca133 100644 --- a/src/libsail-common/CMakeLists.txt +++ b/src/libsail-common/CMakeLists.txt @@ -102,7 +102,9 @@ sail_enable_posix_source(TARGET sail-common VERSION 200112L) sail_enable_pch(TARGET sail-common HEADER sail-common.h) -sail_install_pdb(TARGET sail-common) +if (SAIL_INSTALL_PDB) + sail_install_pdb(TARGET sail-common) +endif() # Definitions, includes, link # diff --git a/src/libsail-manip/CMakeLists.txt b/src/libsail-manip/CMakeLists.txt index 6f45fe9be..519ec3356 100644 --- a/src/libsail-manip/CMakeLists.txt +++ b/src/libsail-manip/CMakeLists.txt @@ -30,7 +30,9 @@ sail_enable_asan(TARGET sail-manip) sail_enable_pch(TARGET sail-manip HEADER sail-manip.h) -sail_install_pdb(TARGET sail-manip) +if (SAIL_INSTALL_PDB) + sail_install_pdb(TARGET sail-manip) +endif() # Definitions, includes, link # diff --git a/src/libsail/CMakeLists.txt b/src/libsail/CMakeLists.txt index 0eb61c16a..2ab6b9b4a 100644 --- a/src/libsail/CMakeLists.txt +++ b/src/libsail/CMakeLists.txt @@ -72,7 +72,9 @@ sail_enable_posix_source(TARGET sail VERSION 200112L) sail_enable_pch(TARGET sail HEADER sail.h) -sail_install_pdb(TARGET sail) +if (SAIL_INSTALL_PDB) + sail_install_pdb(TARGET sail) +endif() # Definitions, includes, link # diff --git a/src/sail-codecs-archive/CMakeLists.txt b/src/sail-codecs-archive/CMakeLists.txt index 0a24f82d5..1bf21dec5 100644 --- a/src/sail-codecs-archive/CMakeLists.txt +++ b/src/sail-codecs-archive/CMakeLists.txt @@ -51,7 +51,9 @@ target_link_libraries(sail-codecs PRIVATE sail-common) sail_enable_asan(TARGET sail-codecs) -sail_install_pdb(TARGET sail-codecs) +if (SAIL_INSTALL_PDB) + sail_install_pdb(TARGET sail-codecs) +endif() # BUILD_INTERFACE is needed as CMake tries to export all the sail-codec-${CODEC} dependencies # in the below install(TARGETS) command even though they are OBJECT libraries.