1
0
Fork 0

Linux fixes for Cmake support.

This commit is contained in:
James Turner 2011-08-31 09:12:56 -07:00 committed by Christian Schmitt
parent 83e6225460
commit 4e39bff58a
12 changed files with 43 additions and 17 deletions

View file

@ -28,6 +28,7 @@ find_package(Boost REQUIRED)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
find_package(SimGear 2.5.0 REQUIRED) find_package(SimGear 2.5.0 REQUIRED)
find_package(GPC REQUIRED)
find_package(TIFF) # needed for SRTM find_package(TIFF) # needed for SRTM
find_package(NewMat11) find_package(NewMat11)
@ -73,8 +74,6 @@ include_directories(${PROJECT_BINARY_DIR}/src/Include)
add_definitions(-DHAVE_CONFIG_H) add_definitions(-DHAVE_CONFIG_H)
#check_function_exists(mkfifo HAVE_MKFIFO)
# configure a header file to pass some of the CMake settings # configure a header file to pass some of the CMake settings
# to the source code # to the source code
configure_file ( configure_file (

View file

@ -0,0 +1,25 @@
FIND_PATH(GPC_INCLUDE_DIR gpc.h
HINTS $ENV{GPC_DIR}
PATH_SUFFIXES include
PATHS
/usr/local
/usr
/opt
)
FIND_LIBRARY(GPC_LIBRARY
NAMES genpolyclip gpc
HINTS
$ENV{GPC_DIR}
PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
PATHS
/usr/local
/usr
/opt
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GPC DEFAULT_MSG
GPC_LIBRARY GPC_INCLUDE_DIR)

View file

@ -26,6 +26,6 @@ target_link_libraries(genapts
TriangleJRS TriangleJRS
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip ${GPC_LIBRARY}
${NEWMAT_LIBRARY}) ${NEWMAT_LIBRARY})

View file

@ -10,4 +10,4 @@ target_link_libraries(testclipper
Clipper Osgb36 Triangulate Polygon Geometry Clipper Osgb36 Triangulate Polygon Geometry
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})

View file

@ -9,14 +9,14 @@ set_target_properties(fgfs-construct PROPERTIES
"DEFAULT_USGS_MAPFILE=\"${PKGDATADIR}/usgsmap.txt\";DEFAULT_PRIORITIES_FILE=\"${PKGDATADIR}/default_priorities.txt\"" ) "DEFAULT_USGS_MAPFILE=\"${PKGDATADIR}/usgsmap.txt\";DEFAULT_PRIORITIES_FILE=\"${PKGDATADIR}/default_priorities.txt\"" )
target_link_libraries(fgfs-construct target_link_libraries(fgfs-construct
Clipper Osgb36 Triangulate GenOutput Clipper GenOutput Osgb36 Triangulate
Match Match
Polygon Geometry Polygon Geometry
Array Optimize Output landcover poly2tri Array Optimize Output landcover poly2tri
TriangleJRS TriangleJRS
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})
add_executable(fgfs-master add_executable(fgfs-master
@ -25,4 +25,4 @@ add_executable(fgfs-master
target_link_libraries(fgfs-master target_link_libraries(fgfs-master
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
) )

View file

@ -5,7 +5,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src/Lib)
include_directories(${PROJECT_SOURCE_DIR}/src/BuildTiles) include_directories(${PROJECT_SOURCE_DIR}/src/BuildTiles)
add_subdirectory(Array) add_subdirectory(Array)
add_subdirectory(Dem) add_subdirectory(DEM)
add_subdirectory(Geometry) add_subdirectory(Geometry)
add_subdirectory(HGT) add_subdirectory(HGT)
add_subdirectory(Optimize) add_subdirectory(Optimize)

View file

@ -10,7 +10,8 @@ add_library(TriangleJRS STATIC
set_target_properties(TriangleJRS PROPERTIES set_target_properties(TriangleJRS PROPERTIES
COMPILE_DEFINITIONS TRILIBRARY ) COMPILE_DEFINITIONS TRILIBRARY )
add_executable(test_triangle test_triangle.c) #add_executable(test_triangle test_triangle.c)
target_link_libraries(test_triangle #target_link_libraries(test_triangle
TriangleJRS) # TriangleJRS
# )

View file

@ -7,5 +7,5 @@ target_link_libraries(e00lines
Polygon Geometry Output poly2tri TriangleJRS vpf Polygon Geometry Output poly2tri TriangleJRS vpf
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})

View file

@ -8,7 +8,7 @@ target_link_libraries(gshhs
Polygon Geometry Output poly2tri Polygon Geometry Output poly2tri
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})
add_executable(gshhs_debug add_executable(gshhs_debug
debug.cxx) debug.cxx)
@ -17,5 +17,5 @@ target_link_libraries(gshhs_debug
Polygon Geometry Output poly2tri Polygon Geometry Output poly2tri
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})

View file

@ -6,7 +6,7 @@ target_link_libraries(shape-decode
shape Polygon Geometry Output poly2tri TriangleJRS vpf shape Polygon Geometry Output poly2tri TriangleJRS vpf
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})
add_executable(noaa-decode noaa-decode.cxx) add_executable(noaa-decode noaa-decode.cxx)
@ -14,5 +14,5 @@ target_link_libraries(noaa-decode
shape Polygon Geometry Output poly2tri TriangleJRS vpf shape Polygon Geometry Output poly2tri TriangleJRS vpf
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})

View file

@ -26,6 +26,7 @@
#include <simgear/compiler.h> #include <simgear/compiler.h>
#include <string> #include <string>
#include <cstdlib>
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>
#include <simgear/misc/sg_path.hxx> #include <simgear/misc/sg_path.hxx>

View file

@ -5,5 +5,5 @@ target_link_libraries(tgvpf
Polygon Geometry Output poly2tri TriangleJRS vpf Polygon Geometry Output poly2tri TriangleJRS vpf
${SIMGEAR_CORE_LIBRARIES} ${SIMGEAR_CORE_LIBRARIES}
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
genpolyclip) ${GPC_LIBRARY})