summaryrefslogtreecommitdiff
path: root/app/bin/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-02-06 16:04:24 +0100
commit5d2c2b27a6323e2666378b986129b2a7c2c39e5c (patch)
treece8982b6c0111f79791068de2c2d4c6ce3138a49 /app/bin/CMakeLists.txt
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
New upstream version 5.2.2GAupstream/5.2.2GA
Diffstat (limited to 'app/bin/CMakeLists.txt')
-rw-r--r--app/bin/CMakeLists.txt94
1 files changed, 84 insertions, 10 deletions
diff --git a/app/bin/CMakeLists.txt b/app/bin/CMakeLists.txt
index 2dea1bc..8d28205 100644
--- a/app/bin/CMakeLists.txt
+++ b/app/bin/CMakeLists.txt
@@ -1,6 +1,7 @@
include( CheckSymbolExists )
ADD_EXECUTABLE(cnvdsgn cnvdsgn.c utility.c)
+
IF(NOT WIN32)
TARGET_LINK_LIBRARIES(cnvdsgn m)
ENDIF(NOT WIN32)
@@ -53,15 +54,24 @@ ADD_CUSTOM_COMMAND(
COMMAND genhelp ${GENHELP_OPTS} ${help_SOURCE_DIR}/genhelp.json ${CMAKE_CURRENT_BINARY_DIR}/bllnhlp.c
)
+ADD_EXECUTABLE(xtrkcad WIN32
+ misc.c
+ xtrkcad.rc
+)
+
SET(SOURCES
${LIN_SOURCES}
appdefaults.c
archive.c
+ archive.h
bllnhlp.c
cbezier.c
+ cbezier.h
cblock.c
ccornu.c
+ ccornu.h
ccurve.c
+ ccurve.h
ccontrol.c
cdraw.c
celev.c
@@ -69,21 +79,27 @@ SET(SOURCES
chndldto.c
chotbar.c
cjoin.c
+ cjoin.h
cmisc.c
cmodify.c
cnote.c
+ common.h
+ common-ui.h
compound.c
+ compound.h
cparalle.c
cprint.c
cprofile.c
cpull.c
cruler.c
cselect.c
+ cselect.h
csensor.c
csnap.c
csplit.c
csignal.c
cstraigh.c
+ cstraigh.h
cstruct.c
cswitchmotor.c
ctext.c
@@ -93,6 +109,7 @@ SET(SOURCES
cturntbl.c
cundo.c
custom.c
+ custom.h
dbench.c
dbitmap.c
dcar.c
@@ -107,8 +124,10 @@ SET(SOURCES
dpricels.c
dprmfile.c
draw.c
+ draw.h
drawgeom.c
dxfformat.c
+ dxfformat.h
dxfoutput.c
elev.c
file2uri.c
@@ -117,10 +136,14 @@ SET(SOURCES
filenoteui.c
i18n.c
layout.c
+ layout.h
+ levenshtein.c
linknoteui.c
lprintf.c
macro.c
manifest.c
+ misc.c
+ misc.h
misc2.c
param.c
paramfile.c
@@ -138,10 +161,13 @@ SET(SOURCES
tease.c
textnoteui.c
track.c
+ track.h
+ trackx.h
trknote.c
trkseg.c
tstraigh.c
utility.c
+ utility.h
validator.c
cJSON.c
archive.h
@@ -162,10 +188,38 @@ endif(WIN32)
set (SOURCES
${SOURCES}
include/dirent.h
+ include/levenshtein.h
include/paramfile.h
include/paramfilelist.h
+ include/partcatalog.h
+ include/stringxtc.h
+ include/utlist.h
)
+if(XTRKCAD_CREATE_SVG)
+ set (SOURCES
+ ${SOURCES}
+ svgformat.c
+ svgoutput.c
+ )
+ include_directories(${MINIXML_INCLUDE_PATH})
+ if(WIN32)
+
+ add_custom_command(
+ TARGET xtrkcad POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${MINIXML_SHAREDLIB}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+ # add dll to install package
+ install(FILES ${MINIXML_SHAREDLIB}
+ DESTINATION ${XTRKCAD_BIN_INSTALL_DIR}
+ )
+ endif(WIN32)
+
+endif(XTRKCAD_CREATE_SVG)
+
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${XTrkCAD_BINARY_DIR})
INCLUDE_DIRECTORIES(${help_BINARY_DIR})
@@ -183,15 +237,28 @@ ADD_LIBRARY(xtrkcad-lib ${SOURCES})
# This ensures that messages.h has been generated before we build xtrkcad-lib
ADD_DEPENDENCIES(xtrkcad-lib Help)
-ADD_EXECUTABLE(xtrkcad WIN32
- misc.c
- xtrkcad.rc
- )
TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-lib)
TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-wlib)
TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-cornu)
TARGET_LINK_LIBRARIES(xtrkcad dynstring)
+if(XTRKCAD_CREATE_SVG)
+IF(UNIX)
+ if (NOT APPLE)
+ target_link_libraries(xtrkcad ${MINIXML_STATIC_LIBRARY})
+ target_link_libraries(xtrkcad "pthread")
+ else(NOT APPLE)
+ target_link_libraries(xtrkcad ${MINIXML_LIBRARY})
+ endif(NOT APPLE)
+ELSE(UNIX)
+ target_link_libraries(xtrkcad ${MINIXML_STATIC_LIBRARY})
+ENDIF(UNIX)
+endif(XTRKCAD_CREATE_SVG)
+
+IF(UNIX AND NOT APPLE)
+target_link_libraries(xtrkcad ${LIBZIP_LIBRARY} ${LIBZIP_LIBRARIES} ${ZLIB_LIBRARY})
+ELSE(UNIX AND NOT APPLE)
target_link_libraries(xtrkcad ${LIBZIP_LIBRARY} ${LIBZIP_LIBRARIES})
+ENDIF(UNIX AND NOT APPLE)
ADD_EXECUTABLE(mkturnout
${LIN_SOURCES}
@@ -238,13 +305,20 @@ ELSE(NOT WIN32)
)
# add dll to install package
- install(FILES
- ${LIBZIP_SHAREDLIB}
- DESTINATION ${XTRKCAD_BIN_INSTALL_DIR}
+ INSTALL(
+ FILES
+ ${LIBZIP_SHAREDLIB}
+ DESTINATION ${XTRKCAD_BIN_INSTALL_DIR}
)
- install(FILES
- ${ZLIB_SHAREDLIB}
- DESTINATION ${XTRKCAD_BIN_INSTALL_DIR}
+ INSTALL(FILES
+ ${ZLIB_SHAREDLIB}
+ DESTINATION ${XTRKCAD_BIN_INSTALL_DIR}
+ )
+
+ # Copy program PDB file
+ INSTALL(
+ FILES $<TARGET_PDB_FILE:xtrkcad>
+ DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} OPTIONAL
)
ENDIF(NOT WIN32)