diff --git a/src/CCExtractorConfig.h.in b/src/CCExtractorConfig.h.in new file mode 100644 index 00000000..202a9119 --- /dev/null +++ b/src/CCExtractorConfig.h.in @@ -0,0 +1,6 @@ +/** + * the configured options and settings for CCExtractor + */ + +#define CCExtractor_VERSION_MAJOR @CCEXTRACTOR_VERSION_MAJOR@ +#define CCExtractor_VERSION_MINOR @CCEXTRACTOR_VERSION_MINOR@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..9c42879b --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required (VERSION 3.0.2) + +project (CCExtractor) + +#Version number +set (CCEXTRACTOR_VERSION_MAJOR 0) +set (CCEXTRACTOR_VERSION_MINOR 74) + +# configure a header file to pass some of the CMake settings +# to the source code +configure_file ( + "${PROJECT_SOURCE_DIR}/CCExtractorConfig.h.in" + "${PROJECT_BINARY_DIR}/CCExtractorConfig.h" + ) + +include_directories ("${PROJECT_SOURCE_DIR}") +include_directories ("${PROJECT_SOURCE_DIR}/lib_ccx") +include_directories ("${PROJECT_SOURCE_DIR}/gpacmp4/") +include_directories ("${PROJECT_SOURCE_DIR}/libccx_common/") + +SET (CMAKE_C_FLAGS "-O3 -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64") +add_subdirectory (lib_ccx) + +AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR} SOURCEFILE) +set (EXTRA_LIBS ${EXTRA_LIBS} ccx) +set (EXTRA_LIBS ${EXTRA_LIBS} png) +set (EXTRA_LIBS ${EXTRA_LIBS} m) + +add_executable(ccextractor ${SOURCEFILE}) +target_link_libraries (ccextractor ${EXTRA_LIBS}) diff --git a/src/lib_ccx/CMakeLists.txt b/src/lib_ccx/CMakeLists.txt new file mode 100644 index 00000000..fbaf911a --- /dev/null +++ b/src/lib_ccx/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_policy(SET CMP0037 NEW) + +SET (CMAKE_C_FLAGS "-O3 -std=gnu99") +AUX_SOURCE_DIRECTORY("${PROJECT_SOURCE_DIR}/lib_ccx/" SOURCEFILE) +AUX_SOURCE_DIRECTORY("${PROJECT_SOURCE_DIR}/gpacmp4/" SOURCEFILE) +#AUX_SOURCE_DIRECTORY("${PROJECT_SOURCE_DIR}/libpng/" SOURCEFILE) +add_library(ccx ${SOURCEFILE}) + +FILE(GLOB HeaderFiles *.h) +install (TARGETS ccx DESTINATION lib) +install (FILES ${HeaderFiles} DESTINATION include)