Skip to content

Commit 093914b

Browse files
chore: use readstat library from conan (#6063)
* chore: use readstat library from conan * fix find library on Linux * remove some apple stuff --------- Co-authored-by: Joris Goosen <joris@jorisgoosen.nl>
1 parent 0419a6e commit 093914b

File tree

7 files changed

+7
-120
lines changed

7 files changed

+7
-120
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ include(Programs)
115115
# Looking for libraries, e.g., Boost, Qt
116116
include(Libraries)
117117

118-
# Preparing irregular dependencies, e.g., ReadStat
119-
include(Dependencies)
120-
121118
# Setting JASP's parameters, e.g., JASP_VERSION
122119
include(JASP)
123120

Desktop/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ if(LOCAL_MODULES_BUILD)
101101
add_dependencies(JASP ModulesBuild)
102102
endif()
103103

104-
if(APPLE)
105-
add_dependencies(JASPDesktopLib readstat)
106-
endif()
107-
108104
if(WINDOWS)
109105
# This is added to the build folder that JASP doesn't try to recreate the
110106
# junctions in the build folder, they are there anyway!
@@ -177,9 +173,7 @@ target_link_libraries(
177173
${LIBFREEXL_LIBRARIES}
178174
$<$<NOT:$<BOOL:${LINUX}>>:freexl::freexl>
179175
# ReadStat -----------------------------------
180-
${LIBREADSTAT_LIBRARIES}
181-
# Rtools's ReadStat
182-
$<$<PLATFORM_ID:Windows>:${RTOOLS_LIBREADSTAT_DLL_A}>
176+
$<$<NOT:$<BOOL:${LINUX}>>:readstat::readstat>
183177
# librdata -----------------------------------
184178
${LIBRDATA_LIBRARIES}
185179
$<$<PLATFORM_ID:Windows>:${RTOOLS_LIBRDATA_DLL_A}>

Engine/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ if(WINDOWS)
7070
POST_BUILD DEPENDS ${CMAKE_BINARY_DIR}/R-Interface/libR-Interface.dll
7171
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RTOOLS_LIBWINPTHREAD_DLL} ${CMAKE_BINARY_DIR}
7272
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RTOOLS_LIBGCC_S_SEH_DLL} ${CMAKE_BINARY_DIR}
73-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RTOOLS_LIBREADSTAT_DLL} ${CMAKE_BINARY_DIR}
7473
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RTOOLS_LIBSTDCPP_DLL} ${CMAKE_BINARY_DIR}
7574
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RTOOLS_LIBRDATA_DLL} ${CMAKE_BINARY_DIR}
7675
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RTOOLS_MSYS_DLL} ${CMAKE_BINARY_DIR}

Tools/CMake/Dependencies.cmake

Lines changed: 0 additions & 101 deletions
This file was deleted.

Tools/CMake/Install.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ if(WIN32)
421421
${RTOOLS_MSYS_DLL}
422422
${RTOOLS_LIBWINPTHREAD_DLL}
423423
#${RTOOLS_LIBJSONCPP_DLL}
424-
${RTOOLS_LIBREADSTAT_DLL}
425424
${RTOOLS_LIBRDATA_DLL}
426425
${RTOOLS_ZLIB_DLL}
427426
${RTOOLS_LIBBZ2_DLL}

Tools/CMake/Libraries.cmake

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ find_package(ZLIB 1.2 REQUIRED)
4242
find_package(Iconv 1.16 REQUIRED)
4343
find_package(SQLite3 3.37.0 REQUIRED)
4444

45-
#if(USE_CONAN)
46-
# find_package(jsoncpp 1.9 REQUIRED)
47-
#endif()
45+
if(USE_CONAN)
46+
find_package(readstat REQUIRED)
47+
endif()
4848

4949
find_package(OpenSSL 1.1.1 COMPONENTS SSL Crypto)
5050
if(NOT OpenSSL_FOUND)
@@ -236,6 +236,7 @@ if(APPLE)
236236
find_package(Brotli 1.0.9 REQUIRED)
237237
find_package(freexl 2.0.99 REQUIRED)
238238
find_package(librdata REQUIRED)
239+
find_package(readstat REQUIRED)
239240

240241
endif()
241242

@@ -245,7 +246,6 @@ if(WIN32)
245246

246247
find_package(freexl 2.0.99 REQUIRED)
247248

248-
copy_rtools_header(RTOOLS_LIBREADSTAT_H readstat.h ${CMAKE_SOURCE_DIR}/Desktop/data/importers/readstat/readstat.h)
249249
copy_rtools_header(RTOOLS_LIBRDATA_H rdata.h ${CMAKE_SOURCE_DIR}/Desktop/data/importers/rdata/rdata.h)
250250

251251
find_rtools_dll_path(RTOOLS_ZLIB_DLL "zlib1.dll")
@@ -256,9 +256,7 @@ if(WIN32)
256256
find_rtools_dll_path(RTOOLS_LIBRDATA_DLL "librdata-0.dll")
257257
find_rtools_dll_path(RTOOLS_LIBSTDCPP_DLL "libstdc++-6.dll")
258258
find_rtools_dll_path(RTOOLS_LIBRDATA_DLL_A "librdata.dll.a")
259-
find_rtools_dll_path(RTOOLS_LIBREADSTAT_DLL "libreadstat-1.dll")
260259
find_rtools_dll_path(RTOOLS_LIBGCC_S_SEH_DLL "libgcc_s_seh-1.dll")
261-
find_rtools_dll_path(RTOOLS_LIBREADSTAT_DLL_A "libreadstat.dll.a")
262260
find_rtools_dll_path(RTOOLS_LIBWINPTHREAD_DLL "libwinpthread-1.dll")
263261

264262
endif()

conanfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ def requirements(self):
2222
self.requires("openssl/3.4.1")
2323
self.requires("bison/3.7.6")
2424
self.requires("brotli/1.1.0")
25-
self.requires("sqlite3/3.49.1")
25+
self.requires("sqlite3/[>=3.49 <4.0]")
2626
self.requires("gmp/6.3.0")
2727
self.requires("mpfr/4.2.1")
28+
self.requires("readstat/1.1.9")
2829
self.requires("freexl/2.0.99.cci.20250526")
2930
# librdata is not available for Windows platforms on conan-center yet
3031
if self.settings_build.os == "Macos":

0 commit comments

Comments
 (0)