Skip to content

Commit

Permalink
SAIL: Added SAIL_INSTALL_PDB option
Browse files Browse the repository at this point in the history
  • Loading branch information
HappySeaFox committed Apr 21, 2022
1 parent 79d775d commit cd76148
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,")
Expand Down
4 changes: 3 additions & 1 deletion examples/c/sail/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 3 additions & 1 deletion src/bindings/c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 3 additions & 1 deletion src/libsail-common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 3 additions & 1 deletion src/libsail-manip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 3 additions & 1 deletion src/libsail/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
4 changes: 3 additions & 1 deletion src/sail-codecs-archive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit cd76148

Please sign in to comment.