summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2025-01-25 01:31:28 +0100
committerSlávek Banko <slavek.banko@axis.cz>2025-01-25 22:52:39 +0100
commit62c533380bdcf46e4500315455efff14828651b0 (patch)
treee513c354f294b01430998f2cbee64952f90d9392 /ConfigureChecks.cmake
parent34d733475f8f959d9bac4afdfe4cc639c31d0d16 (diff)
downloadsoundkonverter-62c53338.tar.gz
soundkonverter-62c53338.zip
Fix the problem of linking taglib2 on 32 bit architectures
if taglib is not built with large files support. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit bee4995859c674cc3c913cfec544b41efed934a9)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index aa09f95..ec597fc 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -42,6 +42,29 @@ else( )
tde_message_fatal( "taglib is required, but not found on your system" )
endif( )
+tde_save_and_set( CMAKE_REQUIRED_DEFINITIONS "${LARGEFILES_DEFINITIONS}" )
+tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TAGLIB_INCLUDE_DIRS}" )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${TAGLIB_LIBRARIES}" )
+
+check_cxx_source_compiles( "
+ #include <taglib.h>
+ #include <id3v1tag.h>
+
+ int main( int, char** )
+ {
+ off_t tagOffset = 0;
+ TagLib::File *testFile = nullptr;
+ TagLib::ID3v1::Tag *id3tag = new TagLib::ID3v1::Tag(testFile, tagOffset);
+ return 0;
+ }
+ "
+ TAGLIB_LARGE_FILES_SUPPORT
+)
+
+tde_restore( CMAKE_REQUIRED_DEFINITIONS )
+tde_restore( CMAKE_REQUIRED_INCLUDES )
+tde_restore( CMAKE_REQUIRED_LIBRARIES )
+
##### check for cdda interface and paranoia