Skip to content

Commit

Permalink
Without this line, doing a shared build will create
Browse files Browse the repository at this point in the history
-- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-static-targets.cmake
-- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-static-targets-release.cmake

instead of

-- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-shared-targets.cmake
-- Installing: /home/stian/SORT/adplug/libbinio-cmake/_install/lib/cmake/libbinio/libbinio-shared-targets-release.cmake

if invoked like this:
$ cmake -G Ninja -S . -B build-shared -DBUILD_SHARED_LIBS=YES -DCMAKE_BUILD_TYPE=Release
$ cmake --build build-shared
$ cmake --install build-shared --prefix _install
  • Loading branch information
mywave82 committed Jul 9, 2024
1 parent 177668b commit f985456
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ endif()
if(DEFINED libbinio_BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS "${libbinio_BUILD_SHARED_LIBS}")
endif ()
set(libbinio_BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}")

if(BUILD_SHARED_LIBS AND NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION)
message(STATUS "Enabling interprocedural optimization")
Expand Down

0 comments on commit f985456

Please sign in to comment.