2012-09-14 20:39:40 +02:00
|
|
|
############################################################################
|
|
|
|
#
|
|
|
|
# file : internaldeps.cmake
|
|
|
|
# copyright : (C) 2008 by Mart Kelder, 2010 by J.-P. Meuret
|
2021-06-13 14:16:25 +02:00
|
|
|
# web : www.speed-dreams.org
|
2012-09-14 20:39:40 +02:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
############################################################################
|
|
|
|
# #
|
|
|
|
# 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. #
|
|
|
|
# #
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
# @file Internal dependencies (include and libs)
|
|
|
|
# @author Mart Kelder, J.-P. Meuret
|
|
|
|
|
|
|
|
# SD include dirs macros.
|
|
|
|
MACRO(ADD_INTERFACE_INCLUDEDIR)
|
|
|
|
|
|
|
|
ENDMACRO(ADD_INTERFACE_INCLUDEDIR)
|
|
|
|
|
|
|
|
MACRO(ADD_SDLIB_INCLUDEDIR)
|
|
|
|
|
|
|
|
ENDMACRO(ADD_SDLIB_INCLUDEDIR)
|
|
|
|
|
|
|
|
# SD libraries macro.
|
|
|
|
MACRO(ADD_SDLIB_LIBRARY TARGET)
|
|
|
|
|
2019-01-04 04:42:42 +01:00
|
|
|
#MESSAGE(STATUS "ADD_SDLIB_LIBRARY : TARGET = ${TARGET}")
|
|
|
|
#MESSAGE(STATUS "ADD_SDLIB_LIBRARY : ARGN = ${ARGN}")
|
2018-11-28 06:06:03 +01:00
|
|
|
|
2012-09-14 20:39:40 +02:00
|
|
|
SET(SDLIB_OPTIONAL FALSE)
|
|
|
|
SET(SDLIB_STATIC FALSE)
|
|
|
|
SET(SDLIB_TARGET_SUFFIX "")
|
|
|
|
|
|
|
|
FOREACH(SDLIB_LIB ${ARGN})
|
|
|
|
IF(${SDLIB_LIB} STREQUAL "OPTIONAL")
|
|
|
|
SET(SDLIB_OPTIONAL TRUE)
|
|
|
|
ENDIF(${SDLIB_LIB} STREQUAL "OPTIONAL")
|
|
|
|
IF(${SDLIB_LIB} STREQUAL "STATIC")
|
|
|
|
SET(SDLIB_STATIC TRUE)
|
|
|
|
SET(SDLIB_TARGET_SUFFIX "_static")
|
|
|
|
ENDIF(${SDLIB_LIB} STREQUAL "STATIC")
|
|
|
|
ENDFOREACH(SDLIB_LIB ${ARGN})
|
|
|
|
|
|
|
|
FOREACH(SDLIB_LIB ${ARGN})
|
|
|
|
|
|
|
|
SET(SDLIB_IGNORE TRUE)
|
|
|
|
IF(NOT UNIX)
|
|
|
|
SET(SDLIB_IGNORE FALSE)
|
2015-06-18 23:49:18 +02:00
|
|
|
ELSEIF(NOT SDLIB_LIB STREQUAL "ssggraph" AND NOT SDLIB_LIB STREQUAL "osggraph" AND NOT SDLIB_LIB STREQUAL "track")
|
2012-09-14 20:39:40 +02:00
|
|
|
SET(SDLIB_IGNORE FALSE)
|
|
|
|
ENDIF(NOT UNIX)
|
|
|
|
IF(SDLIB_LIB STREQUAL "OPTIONAL" OR SDLIB_LIB STREQUAL "STATIC")
|
|
|
|
SET(SDLIB_IGNORE TRUE) #Ignore: not a real target
|
|
|
|
ENDIF(SDLIB_LIB STREQUAL "OPTIONAL" OR SDLIB_LIB STREQUAL "STATIC")
|
|
|
|
|
|
|
|
IF(SDLIB_LIB STREQUAL "txml" AND OPTION_3RDPARTY_EXPAT)
|
|
|
|
SET(SDLIB_IGNORE TRUE) #Ignore: Use Expat
|
|
|
|
ENDIF(SDLIB_LIB STREQUAL "txml" AND OPTION_3RDPARTY_EXPAT)
|
2021-06-13 14:16:25 +02:00
|
|
|
|
|
|
|
IF(SDLIB_LIB STREQUAL "ephemeris" OR SDLIB_LIB STREQUAL "STATIC")
|
|
|
|
SET(SDLIB_IGNORE TRUE)
|
|
|
|
ENDIF(SDLIB_LIB STREQUAL "ephemeris" OR SDLIB_LIB STREQUAL "STATIC")
|
|
|
|
|
2012-09-14 20:39:40 +02:00
|
|
|
IF(SDLIB_LIB STREQUAL "solid" AND OPTION_3RDPARTY_SOLID)
|
|
|
|
SET(SDLIB_IGNORE TRUE) #Ignore: Use 3rd party SOLID
|
|
|
|
ENDIF(SDLIB_LIB STREQUAL "solid" AND OPTION_3RDPARTY_SOLID)
|
2021-06-13 14:16:25 +02:00
|
|
|
|
2012-09-14 20:39:40 +02:00
|
|
|
IF(NOT SDLIB_IGNORE)
|
|
|
|
|
2018-11-28 06:06:03 +01:00
|
|
|
SET(SDLIB_LIBRARIES ${SDLIB_LIBRARIES} ${SDLIB_LIB}${SDLIB_TARGET_SUFFIX})
|
|
|
|
#MESSAGE(STATUS "ADD_SDLIB_LIBRARY : SDLIB_LIBRARIES = ${SDLIB_LIBRARIES}")
|
2012-09-14 20:39:40 +02:00
|
|
|
|
|
|
|
ENDIF(NOT SDLIB_IGNORE)
|
|
|
|
|
|
|
|
ENDFOREACH(SDLIB_LIB ${SDLIB_LIBS})
|
|
|
|
|
|
|
|
#MESSAGE(STATUS "TARGET_LINK_LIBRARIES(${TARGET} ${SDLIB_LIBRARIES})")
|
|
|
|
TARGET_LINK_LIBRARIES(${TARGET} ${SDLIB_LIBRARIES})
|
2024-10-27 08:59:26 +01:00
|
|
|
# FIX: most libraries require this interface library.
|
|
|
|
TARGET_LINK_LIBRARIES(${TARGET} interfaces)
|
2012-09-14 20:39:40 +02:00
|
|
|
|
|
|
|
ENDMACRO(ADD_SDLIB_LIBRARY TARGET)
|