mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 11:53:25 +00:00
Added Cmake support
This commit is contained in:
parent
5634960813
commit
70cc3c2046
6
src/CCExtractorConfig.h.in
Normal file
6
src/CCExtractorConfig.h.in
Normal file
@ -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@
|
30
src/CMakeLists.txt
Normal file
30
src/CMakeLists.txt
Normal file
@ -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})
|
11
src/lib_ccx/CMakeLists.txt
Normal file
11
src/lib_ccx/CMakeLists.txt
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user