"E. Wing" wrote:
> So I am not clear on your usage case such that -D will not work for
> you. Can you give me some specific examples? My understanding is that
> -D is the ultimate override and will define values no matter what
> (including inventing values we don't actually define).
I know very little of CMake - but I had several trial-and-error
sessions ....
Setting LIB_POSTFIX is such an example. It is declared and defined in
the CMakeLists.txt file in the root directory of the source tree:
SET(LIB_POSTFIX "")
IF(UNIX AND NOT WIN32 AND NOT APPLE)
IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
SET(LIB_POSTFIX "64")
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8")
ENDIF(UNIX AND NOT WIN32 AND NOT APPLE)
Yet I'm unable to override LIB_POSTFIX with -D ""
After appplying the patch by Luigi:
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 6607)
+++ CMakeLists.txt (working copy)
@@ -172,13 +172,16 @@
SET(CMAKE_DEBUG_POSTFIX "d")
-SET(LIB_POSTFIX "")
IF(UNIX AND NOT WIN32 AND NOT APPLE)
IF(CMAKE_SIZEOF_VOID_P MATCHES "8")
- SET(LIB_POSTFIX "64")
+ SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement")
+ MARK_AS_ADVANCED(LIB_POSTFIX)
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8")
ENDIF(UNIX AND NOT WIN32 AND NOT APPLE)
-
+IF(NOT DEFINED LIB_POSTFIX)
+ SET(LIB_POSTFIX "")
+ENDIF(NOT DEFINED LIB_POSTFIX)
+
#SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin/${CMAKE_SYSTEM_NAME})
SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin)
MAKE_DIRECTORY(${OUTPUT_BINDIR})
.... I _am_ able to override LIB_POSTFIX. Maybe the relevant line is this
- but in fact I'm just guessing:
MARK_AS_ADVANCED(LIB_POSTFIX)
Cheers,
Martin.
--
Unix _IS_ user friendly - it's just selective about who its friends are !
--------------------------------------------------------------------------
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/