libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
435 stars 147 forks source link

issues with Findlibxmp-lite.cmake #497

Closed sezero closed 1 year ago

sezero commented 1 year ago

Tested this with SDL2 branch, but they are the same in SDL3 too.

With current source tree, running cmake with -DSDL2MIXER_MOD_XMP_LITE=ON I get:

-- Using system libxmp-lite
CMake Warning (dev) at /opt/cmake3.18/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args`
  (libxmp_lite) does not match the name of the calling package (libxmp-lite).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Findlibxmp-lite.cmake:17 (find_package_handle_standard_args)
  CMakeLists.txt:664 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find libxmp_lite (missing: libxmp_lite_LIBRARY libxmp_lite_INCLUDE_PATH) 
CMake Error at cmake/PrivateSdlFunctions.cmake:141 (get_target_property):
  get_target_property() called with non-existent target
  "libxmp-lite::libxmp-lite".
Call Stack (most recent call first):
  cmake/PrivateSdlFunctions.cmake:151 (get_actual_target)
  CMakeLists.txt:686 (target_get_dynamic_library)

-- Dynamic libxmp-lite: 
[...]
-- Configuring incomplete, errors occurred!

If I apply the following change, it succeeds (note that -shared is NOT present in Findlibxmp.cmake, only in the lite version..)

diff --git a/cmake/Findlibxmp-lite.cmake b/cmake/Findlibxmp-lite.cmake
index 573409f..a7d97f2 100644
--- a/cmake/Findlibxmp-lite.cmake
+++ b/cmake/Findlibxmp-lite.cmake
@@ -1,11 +1,11 @@
 include(FindPackageHandleStandardArgs)

 find_library(libxmp_lite_LIBRARY
-    NAMES xmp
+    NAMES xmp-lite
 )

 find_path(libxmp_lite_INCLUDE_PATH
-    NAMES xmp.h
+    NAMES libxmp-lite/xmp.h xmp.h
 )

 set(libxmp_lite_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of libxmp_lite")
@@ -21,7 +21,7 @@ find_package_handle_standard_args(libxmp_lite
 if(libxmp_lite_FOUND)
     if(NOT TARGET libxmp-lite::libxmp-lite)
         add_library(libxmp-lite::libxmp-lite UNKNOWN IMPORTED)
-        set_target_properties(libxmp_lite::libxmp_lite-shared PROPERTIES
+        set_target_properties(libxmp-lite::libxmp-lite PROPERTIES
             IMPORTED_LOCATION "${libxmp_lite_LIBRARY}"
             INTERFACE_INCLUDE_DIRECTORIES "${libxmp_lite_INCLUDE_PATH}"
             INTERFACE_COMPILE_OPTIONS "${libxmp_lite_COMPILE_OPTIONS}"

... BUT, still with a developer warning:

- Using system libxmp-lite
CMake Warning (dev) at /opt/cmake3.18/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args`
  (libxmp_lite) does not match the name of the calling package (libxmp-lite).
  This can lead to problems in calling code that expects `find_package`
  result variables (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Findlibxmp-lite.cmake:17 (find_package_handle_standard_args)
  CMakeLists.txt:664 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found libxmp_lite: /home/sezero/z2/lib/libxmp-lite.so  

I did not apply my patch above: Leaving things to @madebr. P.S.: With the patch above, cmake itself finds the xmp.h header but the compiler obviously does not.

sezero commented 1 year ago

P.S.: With the patch above, cmake itself finds the xmp.h header but the compiler obviously does not.

P.P.S: Changing the patch the following way works for me.

diff --git a/cmake/Findlibxmp-lite.cmake b/cmake/Findlibxmp-lite.cmake
index 573409f..caeda68 100644
--- a/cmake/Findlibxmp-lite.cmake
+++ b/cmake/Findlibxmp-lite.cmake
@@ -1,12 +1,20 @@
 include(FindPackageHandleStandardArgs)

 find_library(libxmp_lite_LIBRARY
-    NAMES xmp
+    NAMES xmp-lite
 )

 find_path(libxmp_lite_INCLUDE_PATH
     NAMES xmp.h
 )
+if(NOT libxmp_lite_INCLUDE_PATH)
+  find_path(libxmp_lite_INCLUDE_PATH
+    NAMES libxmp-lite/xmp.h
+  )
+  if(libxmp_lite_INCLUDE_PATH)
+    set(libxmp_lite_INCLUDE_PATH ${libxmp_lite_INCLUDE_PATH}/libxmp-lite)
+  endif()
+endif()

 set(libxmp_lite_COMPILE_OPTIONS "" CACHE STRING "Extra compile options of libxmp_lite")

@@ -21,7 +29,7 @@ find_package_handle_standard_args(libxmp_lite
 if(libxmp_lite_FOUND)
     if(NOT TARGET libxmp-lite::libxmp-lite)
         add_library(libxmp-lite::libxmp-lite UNKNOWN IMPORTED)
-        set_target_properties(libxmp_lite::libxmp_lite-shared PROPERTIES
+        set_target_properties(libxmp-lite::libxmp-lite PROPERTIES
             IMPORTED_LOCATION "${libxmp_lite_LIBRARY}"
             INTERFACE_INCLUDE_DIRECTORIES "${libxmp_lite_INCLUDE_PATH}"
             INTERFACE_COMPILE_OPTIONS "${libxmp_lite_COMPILE_OPTIONS}"
sezero commented 1 year ago

@madebr: Had any chance to look at this?

madebr commented 1 year ago

I overlooked this issue. Sorry about that.

How do you build libxmp-lite? Running lite/configure fails with the message below. Running autoreconf does not work too

../configure: line 3640: syntax error near unexpected token `lt_decl_varnames,'
../configure: line 3640: `lt_if_append_uniq(lt_decl_varnames, SED, , ,'

The lite/CMakeLists.txt also fails to configure.

By applying the patch below, I can let libxmp-lite start to build. But it fails quickly.

libxmp patch to get libxmp-lite to start building with CMake ```patch diff --git a/cmake/libxmp-sources.cmake b/cmake/libxmp-sources.cmake index b8cf7d6a..4bc19973 100644 --- a/cmake/libxmp-sources.cmake +++ b/cmake/libxmp-sources.cmake @@ -1,162 +1,162 @@ -set(LIBXMP_SRC_LIST - src/virtual.c - src/format.c - src/period.c - src/player.c - src/read_event.c - src/dataio.c - src/misc.c - src/mkstemp.c - src/md5.c - src/lfo.c - src/scan.c - src/control.c - src/far_extras.c - src/med_extras.c - src/filter.c - src/effects.c - src/mixer.c - src/mix_all.c - src/load_helpers.c - src/load.c - src/hio.c - src/hmn_extras.c - src/extras.c - src/smix.c - src/filetype.c - src/memio.c - src/tempfile.c - src/mix_paula.c - src/miniz_tinfl.c - src/win32.c - src/loaders/common.c - src/loaders/iff.c - src/loaders/itsex.c - src/loaders/lzw.c - src/loaders/voltable.c - src/loaders/sample.c - src/loaders/vorbis.c - src/loaders/xm_load.c - src/loaders/mod_load.c - src/loaders/s3m_load.c - src/loaders/stm_load.c - src/loaders/669_load.c - src/loaders/far_load.c - src/loaders/mtm_load.c - src/loaders/ptm_load.c - src/loaders/okt_load.c - src/loaders/ult_load.c - src/loaders/mdl_load.c - src/loaders/it_load.c - src/loaders/stx_load.c - src/loaders/pt3_load.c - src/loaders/sfx_load.c - src/loaders/flt_load.c - src/loaders/st_load.c - src/loaders/emod_load.c - src/loaders/imf_load.c - src/loaders/digi_load.c - src/loaders/fnk_load.c - src/loaders/ice_load.c - src/loaders/liq_load.c - src/loaders/ims_load.c - src/loaders/masi_load.c - src/loaders/amf_load.c - src/loaders/psm_load.c - src/loaders/stim_load.c - src/loaders/mmd_common.c - src/loaders/mmd1_load.c - src/loaders/mmd3_load.c - src/loaders/rtm_load.c - src/loaders/dt_load.c - src/loaders/no_load.c - src/loaders/arch_load.c - src/loaders/sym_load.c - src/loaders/med2_load.c - src/loaders/med3_load.c - src/loaders/med4_load.c - src/loaders/dbm_load.c - src/loaders/umx_load.c - src/loaders/gdm_load.c - src/loaders/pw_load.c - src/loaders/gal5_load.c - src/loaders/gal4_load.c - src/loaders/mfp_load.c - src/loaders/asylum_load.c - src/loaders/muse_load.c - src/loaders/hmn_load.c - src/loaders/mgt_load.c - src/loaders/chip_load.c - src/loaders/abk_load.c - src/loaders/coco_load.c +set(LIBXMP_SRC_LIST + "${CMAKE_CURRENT_LIST_DIR}/../src/virtual.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/format.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/period.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/player.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/read_event.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/dataio.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/misc.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/mkstemp.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/md5.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/lfo.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/scan.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/control.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/far_extras.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/med_extras.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/filter.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/effects.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/mixer.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/mix_all.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/load_helpers.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/hio.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/hmn_extras.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/extras.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/smix.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/filetype.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/memio.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/tempfile.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/mix_paula.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/miniz_tinfl.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/win32.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/common.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/iff.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/itsex.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/lzw.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/voltable.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/sample.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/vorbis.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/xm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mod_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/s3m_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/stm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/669_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/far_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mtm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/ptm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/okt_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/ult_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mdl_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/it_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/stx_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/pt3_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/sfx_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/flt_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/st_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/emod_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/imf_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/digi_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/fnk_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/ice_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/liq_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/ims_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/masi_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/amf_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/psm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/stim_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mmd_common.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mmd1_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mmd3_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/rtm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/dt_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/no_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/arch_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/sym_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/med2_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/med3_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/med4_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/dbm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/umx_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/gdm_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/pw_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/gal5_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/gal4_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mfp_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/asylum_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/muse_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/hmn_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/mgt_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/chip_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/abk_load.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/coco_load.c" ) set(LIBXMP_SRC_LIST_PROWIZARD - src/loaders/prowizard/prowiz.c - src/loaders/prowizard/ptktable.c - src/loaders/prowizard/tuning.c - src/loaders/prowizard/ac1d.c - src/loaders/prowizard/di.c - src/loaders/prowizard/eureka.c - src/loaders/prowizard/fc-m.c - src/loaders/prowizard/fuchs.c - src/loaders/prowizard/fuzzac.c - src/loaders/prowizard/gmc.c - src/loaders/prowizard/heatseek.c - src/loaders/prowizard/ksm.c - src/loaders/prowizard/mp.c - src/loaders/prowizard/np1.c - src/loaders/prowizard/np2.c - src/loaders/prowizard/np3.c - src/loaders/prowizard/p61a.c - src/loaders/prowizard/pm10c.c - src/loaders/prowizard/pm18a.c - src/loaders/prowizard/pha.c - src/loaders/prowizard/prun1.c - src/loaders/prowizard/prun2.c - src/loaders/prowizard/tdd.c - src/loaders/prowizard/unic.c - src/loaders/prowizard/unic2.c - src/loaders/prowizard/wn.c - src/loaders/prowizard/zen.c - src/loaders/prowizard/tp1.c - src/loaders/prowizard/tp3.c - src/loaders/prowizard/p40.c - src/loaders/prowizard/xann.c - src/loaders/prowizard/theplayer.c - src/loaders/prowizard/pp10.c - src/loaders/prowizard/pp21.c - src/loaders/prowizard/starpack.c - src/loaders/prowizard/titanics.c - src/loaders/prowizard/skyt.c - src/loaders/prowizard/novotrade.c - src/loaders/prowizard/hrt.c - src/loaders/prowizard/noiserun.c + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/prowiz.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/ptktable.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/tuning.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/ac1d.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/di.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/eureka.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/fc-m.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/fuchs.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/fuzzac.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/gmc.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/heatseek.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/ksm.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/mp.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/np1.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/np2.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/np3.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/p61a.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/pm10c.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/pm18a.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/pha.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/prun1.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/prun2.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/tdd.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/unic.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/unic2.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/wn.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/zen.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/tp1.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/tp3.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/p40.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/xann.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/theplayer.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/pp10.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/pp21.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/starpack.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/titanics.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/skyt.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/novotrade.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/hrt.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/loaders/prowizard/noiserun.c" ) set(LIBXMP_SRC_LIST_DEPACKERS - src/depackers/depacker.c - src/depackers/ppdepack.c - src/depackers/unsqsh.c - src/depackers/mmcmp.c - src/depackers/s404_dec.c - src/depackers/arc.c - src/depackers/arcfs.c - src/depackers/arc_unpack.c - src/depackers/lzx.c - src/depackers/lzx_unpack.c - src/depackers/miniz_zip.c - src/depackers/unzip.c - src/depackers/gunzip.c - src/depackers/uncompress.c - src/depackers/bunzip2.c - src/depackers/unlha.c - src/depackers/unxz.c - src/depackers/xz_dec_lzma2.c - src/depackers/xz_dec_stream.c - src/depackers/crc32.c - src/depackers/xfnmatch.c - src/depackers/ptpopen.c - src/depackers/xfd.c - src/depackers/xfd_link.c + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/depacker.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/ppdepack.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/unsqsh.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/mmcmp.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/s404_dec.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/arc.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/arcfs.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/arc_unpack.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/lzx.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/lzx_unpack.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/miniz_zip.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/unzip.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/gunzip.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/uncompress.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/bunzip2.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/unlha.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/unxz.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/xz_dec_lzma2.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/xz_dec_stream.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/crc32.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/xfnmatch.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/ptpopen.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/xfd.c" + "${CMAKE_CURRENT_LIST_DIR}/../src/depackers/xfd_link.c" ) diff --git a/lite/CMakeLists.txt b/lite/CMakeLists.txt index bc9df5c4..f00dcc6a 100644 --- a/lite/CMakeLists.txt +++ b/lite/CMakeLists.txt @@ -5,7 +5,7 @@ set(LIBXMP_DEFINES) set(LIBXMP_DEFINES_PUBLIC) set(LIBXMP_CFLAGS) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/libxmp-checks.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/libxmp-checks.cmake) include(GNUInstallDirs) # -fPIC thing @@ -30,7 +30,7 @@ endif() option(LIBXMP_DISABLE_IT "Disable IT format support in libXMP-lite" OFF) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/libxmp-sources.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/libxmp-sources.cmake) list(APPEND LIBXMP_DEFINES_PUBLIC -DLIBXMP_CORE_PLAYER) if(LIBXMP_DISABLE_IT) ```

(I'm working on top of libsdl-org's vendored libxmp)

sezero commented 1 year ago

Yes, building libxmp-lite from git is not intuitive. Two options: Either build from a release tarball, e.g. from https://github.com/libxmp/libxmp/releases/download/libxmp-4.5.0/libxmp-lite-4.5.0.tar.gz or generate a tarball from git like this and build from it: In topdir, do: ./autogen.sh && make -f Makefile.lite , take libxmp-lite-4.5.1.tar.gz which is newly generated, extract it somewhere and build from it.