Linux fixes for Cmake support.
This commit is contained in:
parent
83e6225460
commit
4e39bff58a
12 changed files with 43 additions and 17 deletions
|
@ -28,6 +28,7 @@ find_package(Boost REQUIRED)
|
|||
find_package(ZLIB REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(SimGear 2.5.0 REQUIRED)
|
||||
find_package(GPC REQUIRED)
|
||||
find_package(TIFF) # needed for SRTM
|
||||
find_package(NewMat11)
|
||||
|
||||
|
@ -73,8 +74,6 @@ include_directories(${PROJECT_BINARY_DIR}/src/Include)
|
|||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
#check_function_exists(mkfifo HAVE_MKFIFO)
|
||||
|
||||
# configure a header file to pass some of the CMake settings
|
||||
# to the source code
|
||||
configure_file (
|
||||
|
|
25
CMakeModules/FindGPC.cmake
Normal file
25
CMakeModules/FindGPC.cmake
Normal 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)
|
|
@ -26,6 +26,6 @@ target_link_libraries(genapts
|
|||
TriangleJRS
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip
|
||||
${GPC_LIBRARY}
|
||||
${NEWMAT_LIBRARY})
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@ target_link_libraries(testclipper
|
|||
Clipper Osgb36 Triangulate Polygon Geometry
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
|
|
@ -9,14 +9,14 @@ set_target_properties(fgfs-construct PROPERTIES
|
|||
"DEFAULT_USGS_MAPFILE=\"${PKGDATADIR}/usgsmap.txt\";DEFAULT_PRIORITIES_FILE=\"${PKGDATADIR}/default_priorities.txt\"" )
|
||||
|
||||
target_link_libraries(fgfs-construct
|
||||
Clipper Osgb36 Triangulate GenOutput
|
||||
Clipper GenOutput Osgb36 Triangulate
|
||||
Match
|
||||
Polygon Geometry
|
||||
Array Optimize Output landcover poly2tri
|
||||
TriangleJRS
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
||||
|
||||
add_executable(fgfs-master
|
||||
|
@ -25,4 +25,4 @@ add_executable(fgfs-master
|
|||
target_link_libraries(fgfs-master
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
)
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src/Lib)
|
|||
include_directories(${PROJECT_SOURCE_DIR}/src/BuildTiles)
|
||||
|
||||
add_subdirectory(Array)
|
||||
add_subdirectory(Dem)
|
||||
add_subdirectory(DEM)
|
||||
add_subdirectory(Geometry)
|
||||
add_subdirectory(HGT)
|
||||
add_subdirectory(Optimize)
|
||||
|
|
|
@ -10,7 +10,8 @@ add_library(TriangleJRS STATIC
|
|||
set_target_properties(TriangleJRS PROPERTIES
|
||||
COMPILE_DEFINITIONS TRILIBRARY )
|
||||
|
||||
add_executable(test_triangle test_triangle.c)
|
||||
#add_executable(test_triangle test_triangle.c)
|
||||
|
||||
target_link_libraries(test_triangle
|
||||
TriangleJRS)
|
||||
#target_link_libraries(test_triangle
|
||||
# TriangleJRS
|
||||
# )
|
||||
|
|
|
@ -7,5 +7,5 @@ target_link_libraries(e00lines
|
|||
Polygon Geometry Output poly2tri TriangleJRS vpf
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ target_link_libraries(gshhs
|
|||
Polygon Geometry Output poly2tri
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
||||
add_executable(gshhs_debug
|
||||
debug.cxx)
|
||||
|
@ -17,5 +17,5 @@ target_link_libraries(gshhs_debug
|
|||
Polygon Geometry Output poly2tri
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ target_link_libraries(shape-decode
|
|||
shape Polygon Geometry Output poly2tri TriangleJRS vpf
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
||||
add_executable(noaa-decode noaa-decode.cxx)
|
||||
|
||||
|
@ -14,5 +14,5 @@ target_link_libraries(noaa-decode
|
|||
shape Polygon Geometry Output poly2tri TriangleJRS vpf
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <simgear/compiler.h>
|
||||
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
|
|
|
@ -5,5 +5,5 @@ target_link_libraries(tgvpf
|
|||
Polygon Geometry Output poly2tri TriangleJRS vpf
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
genpolyclip)
|
||||
${GPC_LIBRARY})
|
||||
|
||||
|
|
Loading…
Reference in a new issue