Commit 32adb634 authored by Ghislain MARY's avatar Ghislain MARY

Clean CMakeLists.txt files.

parent 3ee73fcd
############################################################################
# CMakeLists.txt
# Copyright (C) 2016 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
cmake_minimum_required(VERSION 3.0)
project(matroska2
......@@ -14,9 +36,12 @@ option(CONFIG_DEBUG_LEAKS "Enable internal menory leaks checking support" OFF)
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
include_directories(${CMAKE_BINARY_DIR} ./corec)
include_directories(
${CMAKE_BINARY_DIR}
corec
)
if(NOT ${CMAKE_HOST_SYSTEM_NAME} STREQUAL Windows)
if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
add_compile_options(-fPIC)
endif()
......@@ -27,7 +52,7 @@ add_subdirectory(libebml2)
add_subdirectory(libmatroska2)
install(FILES ${CMAKE_BINARY_DIR}/config.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec
DESTINATION include/corec
)
include(CMakePackageConfigHelpers)
......@@ -45,5 +70,5 @@ configure_file(Matroska2Config.cmake.in
install(FILES
${CMAKE_BINARY_DIR}/Matroska2ConfigVersion.cmake
${CMAKE_BINARY_DIR}/Matroska2Config.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/Matroska2
DESTINATION lib/cmake/Matroska2
)
############################################################################
# CMakeLists.txt
# Copyright (C) 2016 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
set(COREC_SOURCES
array/array.c
helpers/file/bufstream.c
......@@ -18,7 +40,7 @@ set(COREC_SOURCES
str/str.c
)
if(CMAKE_HOST_WIN32)
if(WIN32)
list(APPEND COREC_SOURCES
helpers/charconvert/charconvert_win32.c
helpers/date/date_win32.c
......@@ -34,7 +56,7 @@ else()
helpers/system/ccsystem_posix.c
multithread/multithread_pthread.c
)
if(CMAKE_HOST_APPLE)
if(APPLE)
list(APPEND COREC_SOURCES
helpers/charconvert/charconvert_osx.c
str/str_osx.c
......@@ -52,7 +74,7 @@ else()
endif()
endif()
if(${CONFIG_STDIO})
if(CONFIG_STDIO)
list(APPEND COREC_SOURCES
helpers/file/stream_stdio.c
)
......@@ -61,7 +83,7 @@ endif()
add_library(corec STATIC ${COREC_SOURCES})
install(TARGETS corec
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION lib
)
install(FILES
......@@ -73,17 +95,18 @@ install(FILES
memalloc.h
memheap.h
portab.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec
DESTINATION include/corec
)
install(FILES array/array.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/array)
install(FILES helpers/charconvert/charconvert.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/helpers/charconvert)
install(FILES helpers/date/date.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/helpers/date)
install(FILES helpers/file/file.h
install(FILES array/array.h DESTINATION include/corec/array)
install(FILES helpers/charconvert/charconvert.h DESTINATION include/corec/helpers/charconvert)
install(FILES helpers/date/date.h DESTINATION include/corec/helpers/date)
install(FILES
helpers/file/file.h
helpers/file/streams.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/helpers/file
DESTINATION include/corec/helpers/file
)
install(FILES helpers/md5/md5.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/helpers/md5)
install(FILES helpers/md5/md5.h DESTINATION include/corec/helpers/md5)
install(FILES helpers/parser/buffer.h
helpers/parser/dataheap.h
helpers/parser/hotkey.h
......@@ -92,15 +115,15 @@ install(FILES helpers/parser/buffer.h
helpers/parser/strtab.h
helpers/parser/strtypes.h
helpers/parser/urlpart.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/helpers/parser
DESTINATION include/corec/helpers/parser
)
install(FILES helpers/system/ccsystem.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/helpers/system)
install(FILES multithread/multithread.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/multithread)
install(FILES helpers/system/ccsystem.h DESTINATION include/corec/helpers/system)
install(FILES multithread/multithread.h DESTINATION include/corec/multithread)
install(FILES node/node.h
node/node_internal.h
node/nodebase.h
node/nodetools.h
node/nodetree.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/node
DESTINATION include/corec/node
)
install(FILES str/str.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/corec/str)
install(FILES str/str.h DESTINATION include/corec/str)
############################################################################
# CMakeLists.txt
# Copyright (C) 2016 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
add_library(ebml2 STATIC
ebmlmain.c
ebmlelement.c
......@@ -11,9 +33,9 @@ add_library(ebml2 STATIC
)
install(TARGETS ebml2
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION lib
)
install(DIRECTORY ebml
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
DESTINATION include
)
############################################################################
# CMakeLists.txt
# Copyright (C) 2016 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
add_library(matroska2 STATIC
matroskamain.c
matroskablock.c
......@@ -10,9 +32,9 @@ target_include_directories(matroska2
)
install(DIRECTORY matroska
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
DESTINATION include
)
install(TARGETS matroska2
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION lib
)
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