[mapguide-commits] r9291 - in sandbox/jng/cmake_v2: . Oem/CsMapLibrary
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Jan 8 10:10:05 PST 2018
Author: jng
Date: 2018-01-08 10:10:04 -0800 (Mon, 08 Jan 2018)
New Revision: 9291
Modified:
sandbox/jng/cmake_v2/CMakeLists.txt
sandbox/jng/cmake_v2/Oem/CsMapLibrary/CMakeLists.txt
Log:
Get content installation working for CS-Map
Modified: sandbox/jng/cmake_v2/CMakeLists.txt
===================================================================
--- sandbox/jng/cmake_v2/CMakeLists.txt 2018-01-08 17:11:33 UTC (rev 9290)
+++ sandbox/jng/cmake_v2/CMakeLists.txt 2018-01-08 18:10:04 UTC (rev 9291)
@@ -45,6 +45,8 @@
set(MG_HTTPD_PORT 8008)
set(MG_TOMCAT_PORT 8009)
+set(CSMAP_NO_GRID 1)
+
set(MG_OEM_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Oem")
set(MG_OEM_ROOT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/Oem")
Modified: sandbox/jng/cmake_v2/Oem/CsMapLibrary/CMakeLists.txt
===================================================================
--- sandbox/jng/cmake_v2/Oem/CsMapLibrary/CMakeLists.txt 2018-01-08 17:11:33 UTC (rev 9290)
+++ sandbox/jng/cmake_v2/Oem/CsMapLibrary/CMakeLists.txt 2018-01-08 18:10:04 UTC (rev 9291)
@@ -140,4 +140,55 @@
)
add_library(CsMap STATIC ${CsMap_SRCS})
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../CsMap/Dictionaries DESTINATION ${MG_INSTALL_COORDSYS_PREFIX} COMPONENT ${MG_COMPONENT_COMMON})
\ No newline at end of file
+
+set (CsMapCompiler_SRCS
+ ../CsMap/Dictionaries/CS_Comp.c
+)
+add_executable(CsMapCompiler ${CsMapCompiler_SRCS})
+set_target_properties( CsMapCompiler
+ PROPERTIES OUTPUT_NAME "CS_Comp" )
+target_link_libraries(CsMapCompiler CsMap)
+install(TARGETS CsMapCompiler DESTINATION ${MG_INSTALL_COORDSYS_PREFIX}/Dictionaries COMPONENT ${MG_COMPONENT_COMMON})
+
+set (CsMapDictDiff_SRCS
+ ../CsMap/Dictionaries/CS_DictDiff.c
+)
+add_executable(CsMapDictDiff ${CsMapDictDiff_SRCS})
+set_target_properties( CsMapDictDiff
+ PROPERTIES OUTPUT_NAME "CS_DictDiff" )
+target_link_libraries(CsMapDictDiff CsMap)
+install(TARGETS CsMapDictDiff DESTINATION ${MG_INSTALL_COORDSYS_PREFIX}/Dictionaries COMPONENT ${MG_COMPONENT_COMMON})
+
+set(CSMAP_DICT_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../CsMap/Dictionaries")
+set(CSMAP_DICT_STAGING_DIR "${CMAKE_CURRENT_BINARY_DIR}/CsMap_Install")
+file(COPY ${CSMAP_DICT_SRC_DIR} DESTINATION ${CSMAP_DICT_STAGING_DIR})
+# Remove junk we know to not be related to dictionary data
+if (CSMAP_NO_GRID)
+ file(GLOB_RECURSE CSMAP_JUNK_FILES
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.c"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.cnt"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.HLP"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.mak"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.nmk"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/WW15MGH.GRD"
+ # FIXME: Though this removes the files it still leaves the empty directories
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/Usa/Geoid03/*.*"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/Usa/Geoid96/*.*"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/Usa/Geoid99/*.*"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/Usa/NSRS2007/*.*"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/Usa/NSRS2011/*.*"
+ )
+else (CSMAP_NO_GRID)
+ file(GLOB_RECURSE CSMAP_JUNK_FILES
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.c"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.cnt"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.HLP"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.mak"
+ "${CSMAP_DICT_STAGING_DIR}/Dictionaries/*.nmk"
+ )
+endif (CSMAP_NO_GRID)
+#message(STATUS "Removing CS-Map junk: ${CSMAP_JUNK_FILES}")
+file(REMOVE ${CSMAP_JUNK_FILES})
+
+install(DIRECTORY ${CSMAP_DICT_STAGING_DIR}/Dictionaries DESTINATION ${MG_INSTALL_COORDSYS_PREFIX} COMPONENT ${MG_COMPONENT_COMMON})
+install(CODE "execute_process(COMMAND ${MG_INSTALL_COORDSYS_PREFIX}/Dictionaries/CS_Comp -b ${MG_INSTALL_COORDSYS_PREFIX}/Dictionaries ${MG_INSTALL_COORDSYS_PREFIX}/Dictionaries)")
\ No newline at end of file
More information about the mapguide-commits
mailing list