Skip to content

Commit

Permalink
working build system
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbredholt committed May 15, 2020
1 parent b97014e commit cc0687d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
18 changes: 11 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,26 @@ set(ZLIB_SRCS zlib/crc32.c)

set(SRCS ${COMPAT_SRCS} ${LIBLO_SRCS} ${LIBMAPPER_SRCS} ${ZLIB_SRCS})

include_directories(liblo liblo/src libmapper/include compat-idf/include zlib ${IDF_INCLUDES})
include_directories(libmapper/include liblo compat-idf/include zlib ${IDF_INCLUDES})

add_library(mapper STATIC ${SRCS})

get_filename_component(compat_include compat-idf/include/compat.h ABSOLUTE)
target_compile_options(mapper PRIVATE -DHAVE_CONFIG_H -include${compat_include} -w)
target_compile_options(mapper PRIVATE -DHAVE_CONFIG_H -include${compat_include})

add_custom_command(OUTPUT liblo/config.h
COMMAND cp liblo_config.h liblo/config.h)
COMMAND cp liblo_config.h liblo/config.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_command(OUTPUT liblo/lo/lo.h
COMMAND cp lo.h liblo/lo/lo.h)
COMMAND cp lo.h liblo/lo/lo.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_command(OUTPUT liblo/lo/lo_endian.h
COMMAND cp lo_endian.h liblo/lo/lo_endian.h)
COMMAND cp lo_endian.h liblo/lo/lo_endian.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_command(OUTPUT libmapper/src/config.h
COMMAND cp libmpr_config.h libmapper/src/config.h)
COMMAND cp libmapper_config.h libmapper/src/config.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

add_custom_target(libmapper_config_headers DEPENDS liblo/config.h liblo/lo/lo.h liblo/lo/lo_endian.h libmapper/src/config.h)

add_dependencies(mapper libmapper_config_headers)
add_custom_command(TARGET mapper POST_BUILD COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/genlib.sh)
11 changes: 7 additions & 4 deletions libmpr_config.h → libmapper_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,29 @@
#define LT_OBJDIR ".libs/"

/* Name of package */
#define PACKAGE "libmpr"
#define PACKAGE "libmapper"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "dot_mapper@googlegroups.com"

/* Define to the full name of this package. */
#define PACKAGE_NAME "libmpr"
#define PACKAGE_NAME "libmapper"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libmpr 1.2"
#define PACKAGE_STRING "libmapper 1.2"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libmpr"
#define PACKAGE_TARNAME "libmapper"

/* Define to the home page for this package. */
#define PACKAGE_URL "http://libmapper.org"

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.2"

/* printf code for type long long int */
#define PRINTF_LL "ll"

/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
Expand Down

0 comments on commit cc0687d

Please sign in to comment.