1 --- src/CMakeLists.txt.orig 2017-10-15 22:35:17.000000000 +0200
2 +++ src/CMakeLists.txt 2017-10-22 18:09:47.997475553 +0200
6 "-O3 -msse -msse2 -mfpmath=sse -ffast-math -fomit-frame-pointer"
7 - CACHE STRING "basic X86 complier options"
8 + CACHE STRING "basic X86 compiler options"
11 set (BuildOptionsDebug
13 message(FATAL_ERROR "pkg-config required but not found")
14 endif (PKG_CONFIG_FOUND)
16 +include (CheckFunctionExists)
17 +# musl systems don’t have random_r() and also need argp-standalone
18 +check_function_exists(random_r randomR)
21 + add_definitions(-DHAVE_RANDOM_R)
24 +check_c_source_compiles (
28 + char *argv[]={\"test\"};
29 + argp_parse(0,argc,argv,0,0,0);
34 +if (NOT LIBC_HAS_ARGP)
35 + message(STATUS "libc does not have argp")
36 + find_library (ARGP_LIB argp REQUIRED)
38 + message(STATUS "Found libargp")
40 + message(FATAL_ERROR "libargp required but not found")
42 +endif(NOT LIBC_HAS_ARGP)
45 set (CMAKE_REQUIRED_LIBRARIES z)
46 check_c_source_compiles (
49 target_link_libraries (yoshimi ${ExternLibraries})
52 + target_link_libraries (yoshimi ${ARGP_LIB})
55 install (TARGETS yoshimi RUNTIME DESTINATION bin)
57 install (DIRECTORY ../banks DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/yoshimi