diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2010-09-23 21:06:31 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2010-09-23 21:06:31 +0000 |
commit | e60eeb3602e1d61a55e078f01810faf381fd4e8f (patch) | |
tree | 76f42010d2d1355347e3154e75d43b8103920a58 /CMakeLists.txt | |
parent | 838ffd0c72c0dfd23b3cb5a677be83edfdce3b7a (diff) |
Some CMake fixes from H.sivank:
- Apple gcc does not like "-Wl,--as-needed".
- Fix plugins link step on OSX.
- Put AUTHORS-SHORT, AUTHORS-SHORT-FORMAT and wireshark.pod in build directory.
svn path=/trunk/; revision=34224
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bc3ae7cd2..92bf6e1a9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,12 +184,14 @@ else() add_definitions( -D_U_=\"\" ) endif() -set(WIRESHARK_LD_FLAGS - -Wl,--as-needed - # -flto - # -fwhopr - # -fwhole-program -) +if (NOT APPLE) + set(WIRESHARK_LD_FLAGS + -Wl,--as-needed + # -flto + # -fwhopr + # -fwhole-program + ) +endif() include(CheckCLinkerFlag) set(C 0) @@ -210,7 +212,11 @@ if(ENABLE_STATIC) set(LINK_MODE_MODULE STATIC) else() set(LINK_MODE_LIB SHARED) - set(LINK_MODE_MODULE MODULE) + if(APPLE) + set(LINK_MODE_MODULE SHARED) + else(APPLE) + set(LINK_MODE_MODULE MODULE) + endif(APPLE) endif() # The packagelist is doing some magic: If we add XXX to the packagelist, we @@ -830,7 +836,7 @@ ADD_CUSTOM_COMMAND( ${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl ${CMAKE_SOURCE_DIR}/doc/make-authors-short.pl < ${CMAKE_SOURCE_DIR}/AUTHORS - > AUTHORS-SHORT + > ${CMAKE_BINARY_DIR}/AUTHORS-SHORT DEPENDS ${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl ${CMAKE_SOURCE_DIR}/doc/make-authors-short.pl @@ -843,16 +849,16 @@ ADD_CUSTOM_COMMAND( COMMAND ${PERL} ${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl ${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl - < AUTHORS-SHORT - > AUTHORS-SHORT-FORMAT + < ${CMAKE_BINARY_DIR}/AUTHORS-SHORT + > ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT COMMAND cat ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template AUTHORS-SHORT-FORMAT - > wireshark.pod + > ${CMAKE_BINARY_DIR}/wireshark.pod DEPENDS ${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl ${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl - AUTHORS-SHORT + ${CMAKE_BINARY_DIR}/AUTHORS-SHORT ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template ) |