[brlcad-commits] SF.net SVN: brlcad:[41723] brlcad/branches/cmake/src/other
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2010-12-20 18:31:38
|
Revision: 41723 http://brlcad.svn.sourceforge.net/brlcad/?rev=41723&view=rev Author: starseeker Date: 2010-12-20 18:31:30 +0000 (Mon, 20 Dec 2010) Log Message: ----------- Get tkhtml and tktable working (thank you Bob for the tktable logic in our msvc files.) Modified Paths: -------------- brlcad/branches/cmake/src/other/CMakeLists.txt brlcad/branches/cmake/src/other/tkhtml/CMakeLists.txt brlcad/branches/cmake/src/other/tktable/CMakeLists.txt Modified: brlcad/branches/cmake/src/other/CMakeLists.txt =================================================================== --- brlcad/branches/cmake/src/other/CMakeLists.txt 2010-12-20 18:08:48 UTC (rev 41722) +++ brlcad/branches/cmake/src/other/CMakeLists.txt 2010-12-20 18:31:30 UTC (rev 41723) @@ -129,6 +129,7 @@ IF(BRLCAD_BUILD_LOCAL_TK OR BRLCAD-ENABLE_ALL_LOCAL_LIBS) ADD_SUBDIRECTORY(tk) SET(TK_LIBRARY tk CACHE STRING "TK_LIBRARY" FORCE) + SET(TK_STUB_LIBRARY tkstub CACHE STRING "TK_LIBRARY" FORCE) get_directory_property(TK_INCLUDE_PATH DIRECTORY tk DEFINITION TK_INCLUDE_PATH) SET(TK_INCLUDE_PATH "${TK_INCLUDE_PATH}" CACHE STRING "Tk include paths" FORCE) SET(TK_WISH wish CACHE STRING "Tk shell" FORCE) Modified: brlcad/branches/cmake/src/other/tkhtml/CMakeLists.txt =================================================================== --- brlcad/branches/cmake/src/other/tkhtml/CMakeLists.txt 2010-12-20 18:08:48 UTC (rev 41722) +++ brlcad/branches/cmake/src/other/tkhtml/CMakeLists.txt 2010-12-20 18:31:30 UTC (rev 41723) @@ -1,3 +1,12 @@ +# Minimum required version of CMake +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +IF(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0003 NEW) +ENDIF(COMMAND CMAKE_POLICY) + +# set CMake project name +PROJECT(TKHTML) + include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR} @@ -9,6 +18,14 @@ SET(TKHTML_PKGNAME Tkhtml) SET(TKHTML_PKGVERSION "3.0") +# Windows specific flags +IF(WIN32) + SET(TKHTML_CFLAGS "${TKHTML_CFLAGS} -c -W3 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEP -Ot -Oi -fp:strict -Gs -GS -GL -MD") + SET(TKHTML_CFLAGS "${TKHTML_CFLAGS} -Dinline=__inline -DBUILD_tkhtml") +ENDIF(WIN32) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TKHTML_CFLAGS}") + ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/htmldefaultstyle.c COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_SOURCE_DIR}/src/mkdefaultstyle.tcl > ${CMAKE_CURRENT_BINARY_DIR}/htmldefaultstyle.c @@ -54,7 +71,7 @@ ) add_library(Tkhtml SHARED ${TKHTML_SRCS}) -target_link_libraries(Tkhtml ${TCL_LIBRARY} ${TK_LIBRARY} ${X11_LIBRARIES}) +target_link_libraries(Tkhtml ${TCL_LIBRARY} ${TK_LIBRARY} ${TK_STUB_LIBRARY} ${X11_LIBRARIES}) install(TARGETS Tkhtml DESTINATION lib) # Create the pkgIndex.tcl file. Modified: brlcad/branches/cmake/src/other/tktable/CMakeLists.txt =================================================================== --- brlcad/branches/cmake/src/other/tktable/CMakeLists.txt 2010-12-20 18:08:48 UTC (rev 41722) +++ brlcad/branches/cmake/src/other/tktable/CMakeLists.txt 2010-12-20 18:31:30 UTC (rev 41723) @@ -1,3 +1,12 @@ +# Minimum required version of CMake +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +IF(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0003 NEW) +ENDIF(COMMAND CMAKE_POLICY) + +# set CMake project name +PROJECT(TKTABLE) + include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR} @@ -9,6 +18,15 @@ SET(TKTABLE_PKGNAME Tktable) SET(TKTABLE_PKGVERSION "2.10") +# Windows specific flags +IF(WIN32) + SET(TKTABLE_CFLAGS "${TKTABLE_CFLAGS} -c -W3 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEP -Ot -Oi -fp:strict -Gs -GS -GL -MD") + SET(TKTABLE_CFLAGS "${TKTABLE_CFLAGS} -Dinline=__inline -DBUILD_Tktable") + SET(TKTABLE_CFLAGS "${TKTABLE_CFLAGS} -DTBL_COMMAND=\"table\" -DTBL_RUNTIME=\"tkTable.tcl\" -DTBL_RUNTIME_DIR=\"\"") +ENDIF(WIN32) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TKTABLE_CFLAGS}") + ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tkTable.tcl.h COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_SOURCE_DIR}/misc/tkTable_header.tcl ${CMAKE_CURRENT_SOURCE_DIR}/library/tkTable.tcl ${CMAKE_CURRENT_BINARY_DIR}/tkTable.tcl.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |