Commit 62a8d0b0 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

Export symbols for Windows dlls.

parent e8339d24
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)
INCLUDE(CheckIncludeFiles)
INCLUDE(TestBigEndian)
INCLUDE(CheckCSourceCompiles)
......@@ -75,6 +75,7 @@ CONFIGURE_FILE(
${CMAKE_CURRENT_BINARY_DIR}/config.h
)
SET(BUILD_SHARED_LIBS TRUE)
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests EXCLUDE_FROM_ALL)
INCLUDE(GenerateExportHeader)
SET(libaec_SRCS encode.c encode_accessors.c decode.c)
ADD_LIBRARY(aec SHARED ${libaec_SRCS})
ADD_LIBRARY(aec ${libaec_SRCS})
SET_TARGET_PROPERTIES(aec PROPERTIES
VERSION 0
SOVERSION 0.0
)
ADD_LIBRARY(sz SHARED sz_compat.c)
ADD_LIBRARY(sz sz_compat.c)
SET_TARGET_PROPERTIES(sz PROPERTIES
VERSION 0
SOVERSION 0.0
)
IF(WIN32)
GENERATE_EXPORT_HEADER(aec
BASE_NAME aec
EXPORT_MACRO_NAME aec_EXPORT
EXPORT_FILE_NAME aec_Export.h
STATIC_DEFINE aec_BUILT_AS_STATIC
)
GENERATE_EXPORT_HEADER(sz
BASE_NAME sz
EXPORT_MACRO_NAME sz_EXPORT
EXPORT_FILE_NAME sz_Export.h
STATIC_DEFINE sz_BUILT_AS_STATIC
)
ENDIF(WIN32)
TARGET_LINK_LIBRARIES(sz aec)
ADD_EXECUTABLE(aec_client aec.c)
SET_TARGET_PROPERTIES(aec_client PROPERTIES OUTPUT_NAME "aec")
TARGET_LINK_LIBRARIES(aec_client aec)
ADD_EXECUTABLE(utime EXCLUDE_FROM_ALL utime.c)
IF(UNIX)
ADD_EXECUTABLE(utime EXCLUDE_FROM_ALL utime.c)
ENDIF(UNIX)
INSTALL(FILES libaec.h szlib.h DESTINATION include)
INSTALL(TARGETS aec sz
......
......@@ -19,10 +19,10 @@ ADD_DEPENDENCIES(check
check_buffer_sizes
check_long_fs)
IF(NOT WIN32)
IF(UNIX)
ADD_CUSTOM_TARGET(bench
COMMAND ${CMAKE_SOURCE_DIR}/tests/benc.sh
COMMAND ${CMAKE_SOURCE_DIR}/tests/bdec.sh
DEPENDS aec_client utime
)
ENDIF(NOT WIN32)
ENDIF(UNIX)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment