Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CMOD/src/Libraries.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <vector>
#include <thread>

//Pseudo-standard, but widely used headers
#include <dirent.h>

//The LASS library for additive sound synthesis
#include "LASS.h"
#include "Score.h"
Expand Down
16 changes: 8 additions & 8 deletions CMOD/src/Piece-experimental.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <cerrno>
#include <cstdio>
#include <cstring>
#include <filesystem>
#include <sys/stat.h>

#ifdef _WIN32
Expand All @@ -45,17 +46,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//----------------------------------------------------------------------------//

int PieceHelper::getDirectoryList(string dir, vector<string> &files) {
DIR *dp;
struct dirent *dirp;
if((dp = opendir(dir.c_str())) == NULL) {
cout << "Error(" << errno << ") opening " << dir << endl;
return errno;
error_code error;
filesystem::directory_iterator entries(dir, error);
if(error) {
cout << "Error(" << error.value() << ") opening " << dir << endl;
return error.value();
}

while ((dirp = readdir(dp)) != NULL) {
files.push_back(string(dirp->d_name));
for(const filesystem::directory_entry& entry : entries) {
files.push_back(entry.path().filename().string());
}
closedir(dp);
return 0;

}
Expand Down
27 changes: 23 additions & 4 deletions cmake-modules/FindSndFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,17 @@ function(_dissco_sndfile_extract_from_target)
return()
endif()
get_target_property(_inc SndFile::sndfile INTERFACE_INCLUDE_DIRECTORIES)
# IMPORTED_LOCATION_<CONFIG> is the actual file; LOCATION may be a
# generator expression. Try a few common configs.
# On Windows, a shared imported target has both an import library (used by
# the linker) and a runtime DLL. Prefer IMPORTED_IMPLIB_<CONFIG> for the
# former; other platforms link IMPORTED_LOCATION_<CONFIG> directly.
foreach(_cfg IMPORTED_IMPLIB_RELEASE IMPORTED_IMPLIB_RELWITHDEBINFO
IMPORTED_IMPLIB_MINSIZEREL IMPORTED_IMPLIB_DEBUG
IMPORTED_IMPLIB)
get_target_property(_implib SndFile::sndfile ${_cfg})
if(_implib AND NOT _implib STREQUAL "_implib-NOTFOUND")
break()
endif()
endforeach()
foreach(_cfg IMPORTED_LOCATION_RELEASE IMPORTED_LOCATION_RELWITHDEBINFO
IMPORTED_LOCATION_MINSIZEREL IMPORTED_LOCATION_DEBUG
IMPORTED_LOCATION)
Expand All @@ -58,9 +67,19 @@ function(_dissco_sndfile_extract_from_target)
break()
endif()
endforeach()
if(_inc AND _loc)
if(WIN32 AND _implib)
set(_link_file "${_implib}")
else()
set(_link_file "${_loc}")
endif()
if(_inc AND _link_file)
set(SNDFILE_INCLUDE_DIR "${_inc}" PARENT_SCOPE)
set(SNDFILE_LIBRARY "${_loc}" PARENT_SCOPE)
set(SNDFILE_LIBRARY "${_link_file}" PARENT_SCOPE)
if(WIN32 AND _loc MATCHES "\\.dll$")
set(SNDFILE_DLL "${_loc}" CACHE FILEPATH
"Path to the libsndfile runtime DLL." FORCE)
set(SNDFILE_DLL "${_loc}" PARENT_SCOPE)
endif()
set(SNDFILE_FOUND TRUE PARENT_SCOPE)
endif()
endfunction()
Expand Down
3 changes: 2 additions & 1 deletion external-libs/muParser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ file(GLOB_RECURSE MUPARSER_SRC

### in the future, we'll let this be shared if there's a viable muparser lib install
add_library(MUPARSER STATIC ${MUPARSER_SRC})
target_compile_definitions(MUPARSER PUBLIC MUPARSER_STATIC)

target_include_directories(MUPARSER PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

message(STATUS "DONE!")
message(STATUS "DONE!")
Loading