Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
# process only once
|
|
|
|
if(HAIKU)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(HAIKU 1)
|
|
|
|
set(UNIX 1)
|
2008-09-16 01:53:28 +04:00
|
|
|
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
set(CMAKE_DL_LIBS "")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
|
|
|
|
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
|
|
|
|
|
|
|
|
# Determine, if the C or C++ compiler is configured for a secondary
|
|
|
|
# architecture. If so, that will change the search paths we set below. We check
|
|
|
|
# whether the compiler's library search paths contain a
|
|
|
|
# "/boot/system/develop/lib/<subdir>/", which we assume to be the secondary
|
|
|
|
# architecture specific subdirectory and extract the name of the architecture
|
|
|
|
# accordingly.
|
|
|
|
|
2014-03-03 18:57:05 +04:00
|
|
|
# First of all, find a C or C++ compiler we can run. The "arg1" is necessary
|
|
|
|
# here for compilers such as "distcc gcc-x86" or "ccache gcc-x86"
|
|
|
|
# TODO See CMakeDetermineCompilerId.cmake for some more things we may want to do.
|
|
|
|
if(CMAKE_C_COMPILER)
|
|
|
|
set(__HAIKU_COMPILER ${CMAKE_C_COMPILER})
|
|
|
|
string (STRIP "${CMAKE_C_COMPILER_ARG1}" __HAIKU_COMPILER_FLAGS)
|
|
|
|
else()
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
set(__HAIKU_COMPILER ${CMAKE_CXX_COMPILER})
|
2014-03-03 18:57:05 +04:00
|
|
|
string (STRIP "${CMAKE_CXX_COMPILER_ARG1}" __HAIKU_COMPILER_FLAGS)
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
endif()
|
|
|
|
|
2014-03-03 18:57:05 +04:00
|
|
|
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
execute_process(
|
2014-03-03 18:57:05 +04:00
|
|
|
COMMAND ${__HAIKU_COMPILER} ${__HAIKU_COMPILER_FLAGS} -print-search-dirs
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
OUTPUT_VARIABLE _HAIKU_SEARCH_DIRS
|
2014-03-03 18:57:05 +04:00
|
|
|
RESULT_VARIABLE _HAIKU_SEARCH_DIRS_FOUND
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
2014-03-03 18:57:05 +04:00
|
|
|
string(REGEX MATCH "libraries: =?([^\n]*:)?/boot/system/develop/lib/([^/]*)/?(:?\n+)" _dummy "${_HAIKU_SEARCH_DIRS}\n")
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
set(CMAKE_HAIKU_SECONDARY_ARCH "${CMAKE_MATCH_2}")
|
|
|
|
|
|
|
|
if(NOT CMAKE_HAIKU_SECONDARY_ARCH)
|
|
|
|
set(CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR "")
|
|
|
|
unset(CMAKE_HAIKU_SECONDARY_ARCH)
|
|
|
|
else()
|
|
|
|
set(CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR "/${CMAKE_HAIKU_SECONDARY_ARCH}")
|
|
|
|
|
|
|
|
# Override CMAKE_*LIBRARY_ARCHITECTURE. This will cause FIND_LIBRARY to search
|
|
|
|
# the libraries in the correct subdirectory first. It still isn't completely
|
|
|
|
# correct, since the parent directories shouldn't be searched at all. The
|
|
|
|
# primary architecture library might still be found, if there isn't one
|
|
|
|
# installed for the secondary architecture or it is installed in a less
|
|
|
|
# specific location.
|
|
|
|
set(CMAKE_LIBRARY_ARCHITECTURE ${CMAKE_HAIKU_SECONDARY_ARCH})
|
|
|
|
set(CMAKE_C_LIBRARY_ARCHITECTURE ${CMAKE_HAIKU_SECONDARY_ARCH})
|
|
|
|
set(CMAKE_CXX_LIBRARY_ARCHITECTURE ${CMAKE_HAIKU_SECONDARY_ARCH})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
|
2014-03-03 18:57:05 +04:00
|
|
|
/boot/system/non-packaged
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
/boot/system
|
|
|
|
)
|
|
|
|
|
|
|
|
LIST(APPEND CMAKE_HAIKU_COMMON_INCLUDE_DIRECTORIES
|
2014-03-03 18:57:05 +04:00
|
|
|
/boot/system/non-packaged/develop/headers${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
/boot/system/develop/headers/os
|
|
|
|
/boot/system/develop/headers/os/app
|
|
|
|
/boot/system/develop/headers/os/device
|
|
|
|
/boot/system/develop/headers/os/drivers
|
|
|
|
/boot/system/develop/headers/os/game
|
|
|
|
/boot/system/develop/headers/os/interface
|
|
|
|
/boot/system/develop/headers/os/kernel
|
|
|
|
/boot/system/develop/headers/os/locale
|
|
|
|
/boot/system/develop/headers/os/mail
|
|
|
|
/boot/system/develop/headers/os/media
|
|
|
|
/boot/system/develop/headers/os/midi
|
|
|
|
/boot/system/develop/headers/os/midi2
|
|
|
|
/boot/system/develop/headers/os/net
|
|
|
|
/boot/system/develop/headers/os/opengl
|
|
|
|
/boot/system/develop/headers/os/storage
|
|
|
|
/boot/system/develop/headers/os/support
|
|
|
|
/boot/system/develop/headers/os/translation
|
|
|
|
/boot/system/develop/headers/os/add-ons/graphics
|
|
|
|
/boot/system/develop/headers/os/add-ons/input_server
|
|
|
|
/boot/system/develop/headers/os/add-ons/screen_saver
|
|
|
|
/boot/system/develop/headers/os/add-ons/tracker
|
|
|
|
/boot/system/develop/headers/os/be_apps/Deskbar
|
|
|
|
/boot/system/develop/headers/os/be_apps/NetPositive
|
|
|
|
/boot/system/develop/headers/os/be_apps/Tracker
|
|
|
|
/boot/system/develop/headers/3rdparty
|
|
|
|
/boot/system/develop/headers/bsd
|
|
|
|
/boot/system/develop/headers/glibc
|
|
|
|
/boot/system/develop/headers/gnu
|
|
|
|
/boot/system/develop/headers/posix
|
|
|
|
/boot/system/develop/headers${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}
|
|
|
|
)
|
|
|
|
IF (CMAKE_HAIKU_SECONDARY_ARCH)
|
|
|
|
LIST(APPEND CMAKE_HAIKU_COMMON_INCLUDE_DIRECTORIES
|
|
|
|
/boot/system/develop/headers
|
|
|
|
)
|
|
|
|
ENDIF (CMAKE_HAIKU_SECONDARY_ARCH)
|
|
|
|
|
|
|
|
LIST(APPEND CMAKE_HAIKU_C_INCLUDE_DIRECTORIES
|
|
|
|
${CMAKE_HAIKU_COMMON_INCLUDE_DIRECTORIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
LIST(APPEND CMAKE_HAIKU_CXX_INCLUDE_DIRECTORIES
|
|
|
|
${CMAKE_HAIKU_COMMON_INCLUDE_DIRECTORIES})
|
|
|
|
|
|
|
|
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_HAIKU_C_INCLUDE_DIRECTORIES})
|
|
|
|
|
|
|
|
LIST(APPEND CMAKE_HAIKU_DEVELOP_LIB_DIRECTORIES
|
2014-03-03 18:57:05 +04:00
|
|
|
/boot/system/non-packaged/develop/lib${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
/boot/system/develop/lib${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
|
|
|
|
${CMAKE_HAIKU_DEVELOP_LIB_DIRECTORIES}
|
|
|
|
)
|
2008-09-16 01:53:28 +04:00
|
|
|
|
Haiku: Several fixes to platform module
* Do not define BEOS anymore (this includes workarounds which we don't
need most of the time in Haiku, so we prefer opt-in IF(HAIKU) in the
cmake files instead).
* On the other hand, do define UNIX (we are trying to be compliant) and
HAIKU (there is still a number of things we don't do like the
average UNIX clone)
* Do not use UnixPaths, as our filesystem hierarchy isn't anything like
what it expects.
* Do not use -nostart, which the compiler doesn't know about anymore.
This used to be an Haiku extension to gcc, and is equivalent to
-shared which is the default gcc option.
* While "dl" functions are provided in libroot, this is always
implicitly linked so there is no need to tell cmake about it.
* Forcing position-independent code is not needed, so remove it.
* On the other hand, include appropriate linker options for executables
and shared libraries.
* Support for the two available compilers in Haiku (gcc2 and gcc4) and
pick the right headers and libraries according to the currently
selected one.
* With the adoption of the package manager, the directory layout was
changed. Tell cmake where to look for header files and libraries.
* As we don't define BEOS anymore, enable the workaround we still need
for HAIKU as well. This is the lack of a libm (it is part of the
implicitly linked in libroot)
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-05 18:26:02 +04:00
|
|
|
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_HAIKU_DEVELOP_LIB_DIRECTORIES})
|
2009-09-30 16:31:53 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
2014-03-03 18:57:05 +04:00
|
|
|
set(CMAKE_INSTALL_PREFIX "/boot/system" CACHE PATH
|
2009-09-30 16:31:53 +04:00
|
|
|
"Install path prefix, prepended onto install directories." FORCE)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|