Skip to content

Commit

Permalink
move build specifier in own cMake group
Browse files Browse the repository at this point in the history
  • Loading branch information
jriegel committed Aug 3, 2014
1 parent c24a516 commit ec21981
Show file tree
Hide file tree
Showing 32 changed files with 154 additions and 154 deletions.
16 changes: 8 additions & 8 deletions src/3rdParty/CMakeLists.txt
@@ -1,21 +1,21 @@

if(FREECAD_BUILD_CAM)
if(BUILD_CAM)
add_subdirectory(ANN)
endif(FREECAD_BUILD_CAM)
endif(BUILD_CAM)

if(FREECAD_BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)
if(BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)
if(FREECAD_LIBPACK_CHECKFILE6X)
add_subdirectory(Pivy)
elseif(FREECAD_LIBPACK_CHECKFILE7X)
add_subdirectory(Pivy-0.5)
#elseif(FREECAD_BUILD_GUI AND FREECAD_LIBPACK_CHECKCUSTOM)
#elseif(BUILD_GUI AND FREECAD_LIBPACK_CHECKCUSTOM)
# find_path(COIN_VERSION3 Inventor/scxml/ScXML.h ${COIN3D_INCLUDE_DIR})
# if (COIN_VERSION3)
# add_subdirectory(Pivy-0.5)
# else (COIN_VERSION3)
# add_subdirectory(Pivy)
# endif(COIN_VERSION3)
#endif(FREECAD_BUILD_GUI AND FREECAD_LIBPACK_CHECKFILE6X)
#endif(BUILD_GUI AND FREECAD_LIBPACK_CHECKFILE6X)
#if (MINGW)
# add_subdirectory(Pivy)
#endif(MINGW)
Expand All @@ -32,10 +32,10 @@ if(FREECAD_BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)
endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Pivy)
endif(COIN_VERSION3)
endif (FREECAD_LIBPACK_CHECKFILE6X)
endif(FREECAD_BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)
endif(BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)

# Build SalomeMesh for all Platforms since heavily patched
if (FREECAD_BUILD_SMESH)
if (BUILD_SMESH)
add_subdirectory(salomesmesh)
endif(FREECAD_BUILD_SMESH)
endif(BUILD_SMESH)

20 changes: 10 additions & 10 deletions src/3rdParty/salomesmesh/CMakeLists.txt
Expand Up @@ -27,7 +27,7 @@ include_directories(
link_directories(${OCC_LIBRARY_DIR})

if(MSVC)
if(FREECAD_BUILD_FEM_NETGEN)
if(BUILD_FEM_NETGEN)
set(SMESH_LIBS
debug MSVCRTD.LIB
debug MSVCPRTD.LIB
Expand All @@ -41,7 +41,7 @@ if(MSVC)
${OCC_OCAF_DEBUG_LIBRARIES}
${OCC_OCAF_LIBRARIES}
)
else(FREECAD_BUILD_FEM_NETGEN)
else(BUILD_FEM_NETGEN)
set(SMESH_LIBS
debug MSVCRTD.LIB
debug MSVCPRTD.LIB
Expand All @@ -53,21 +53,21 @@ if(MSVC)
${OCC_OCAF_DEBUG_LIBRARIES}
${OCC_OCAF_LIBRARIES}
)
endif(FREECAD_BUILD_FEM_NETGEN)
endif(BUILD_FEM_NETGEN)

else(MSVC)
if(FREECAD_BUILD_FEM_NETGEN)
if(BUILD_FEM_NETGEN)
set(SMESH_LIBS
${NGLIB_LIBRARIES}
${OCC_LIBRARIES}
${OCC_OCAF_LIBRARIES}
)
else(FREECAD_BUILD_FEM_NETGEN)
else(BUILD_FEM_NETGEN)
set(SMESH_LIBS
${OCC_LIBRARIES}
${OCC_OCAF_LIBRARIES}
)
endif(FREECAD_BUILD_FEM_NETGEN)
endif(BUILD_FEM_NETGEN)
endif(MSVC)


Expand Down Expand Up @@ -337,7 +337,7 @@ endif(WIN32)
#ENDIF(MINGW)

# Disable for all other compilers but MSVC
if (FREECAD_BUILD_FEM_NETGEN)
if (BUILD_FEM_NETGEN)

################
# NETGENPlugin #
Expand All @@ -351,7 +351,7 @@ if(WIN32)
set_target_properties(NETGENPlugin PROPERTIES COMPILE_FLAGS "-DNETGENPLUGIN_EXPORTS -DNO_PARALLEL_THREADS -DOCCGEOMETRY -DNETGEN_V5")
endif(WIN32)

endif (FREECAD_BUILD_FEM_NETGEN)
endif (BUILD_FEM_NETGEN)

#IF(WIN32)
# SET_TARGET_PROPERTIES(SMESH PROPERTIES COMPILE_FLAGS "-DNETGENPluginimpl_EXPORTS ")
Expand All @@ -372,7 +372,7 @@ else(WIN32)
)
endif(WIN32)

if (FREECAD_BUILD_FEM_NETGEN)
if (BUILD_FEM_NETGEN)
if(WIN32)
INSTALL(TARGETS NETGENPlugin
RUNTIME DESTINATION bin
Expand All @@ -383,5 +383,5 @@ if (FREECAD_BUILD_FEM_NETGEN)
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif(WIN32)
endif (FREECAD_BUILD_FEM_NETGEN)
endif (BUILD_FEM_NETGEN)

8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Expand Up @@ -5,16 +5,16 @@ add_subdirectory(Base)
add_subdirectory(App)
add_subdirectory(Main)
add_subdirectory(Mod)
if(FREECAD_BUILD_GUI)
if(BUILD_GUI)
add_subdirectory(Gui)
configure_file(Doc/Start_Page.html ${CMAKE_BINARY_DIR}/doc/Start_Page.html COPYONLY)
configure_file(Doc/freecad.qhc ${CMAKE_BINARY_DIR}/doc/freecad.qhc COPYONLY)
configure_file(Doc/freecad.qch ${CMAKE_BINARY_DIR}/doc/freecad.qch COPYONLY)
endif(FREECAD_BUILD_GUI)
endif(BUILD_GUI)

if(FREECAD_BUILD_TEMPLATE)
if(BUILD_TEMPLATE)
add_subdirectory(Tools/_TEMPLATE_)
endif(FREECAD_BUILD_TEMPLATE)
endif(BUILD_TEMPLATE)

add_subdirectory(Doc)

Expand Down
6 changes: 3 additions & 3 deletions src/Doc/CMakeLists.txt
Expand Up @@ -12,9 +12,9 @@ if(DOXYGEN_FOUND)
MARK_AS_ADVANCED(DOXYGEN_LANGUAGE)

# note: this test is obsolete if DevDoc target is used
if (NOT FREECAD_BUILD_GUI)
if (NOT BUILD_GUI)
message("Note: Gui is not built. Documentation may lack some parts.")
endif (NOT FREECAD_BUILD_GUI)
endif (NOT BUILD_GUI)

# directory order seems important for correct macro expansion
# (files containing macros definitions must be parsed before the files using them)
Expand Down Expand Up @@ -97,7 +97,7 @@ if(DOXYGEN_FOUND)
# generate source documentation
# delete CMakeCache to reset to default build options next time
ADD_CUSTOM_TARGET(DevDoc
${CMAKE_COMMAND} -D FREECAD_BUILD_GUI:BOOL=ON -D FREECAD_BUILD_FEM:BOOL=ON ${CMAKE_SOURCE_DIR}
${CMAKE_COMMAND} -D BUILD_GUI:BOOL=ON -D BUILD_FEM:BOOL=ON ${CMAKE_SOURCE_DIR}
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/BuildDevDoc.cfg
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/CMakeCache.txt
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
Expand Down
14 changes: 7 additions & 7 deletions src/Main/CMakeLists.txt
@@ -1,7 +1,7 @@
#add_defintions(-D_FC_GUI_ENABLED_)
#add_defintions(-DFREECADMAINPY)

if(FREECAD_BUILD_GUI)
if(BUILD_GUI)
include_directories(
${Boost_INCLUDE_DIRS}
${COIN3D_INCLUDE_DIR}
Expand All @@ -11,18 +11,18 @@ if(FREECAD_BUILD_GUI)
${PYTHON_INCLUDE_PATH}
${XERCESC_INCLUDE_DIR}
)
else(FREECAD_BUILD_GUI)
else(BUILD_GUI)
include_directories(
${Boost_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${QT_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH}
${XERCESC_INCLUDE_DIR}
)
endif(FREECAD_BUILD_GUI)
endif(BUILD_GUI)

######################## FreeCADMain ########################
if(FREECAD_BUILD_GUI)
if(BUILD_GUI)

SET(FreeCAD_SRCS
freecad.rc
Expand Down Expand Up @@ -57,7 +57,7 @@ if(FREECAD_BUILD_GUI)
RUNTIME DESTINATION bin
)
endif(WIN32)
endif(FREECAD_BUILD_GUI)
endif(BUILD_GUI)
######################## FreeCADMainCmd ########################

SET(FreeCADMainCmd_SRCS
Expand Down Expand Up @@ -109,7 +109,7 @@ else(WIN32)
endif(WIN32)

######################## FreeCADGuiPy ########################
if(FREECAD_BUILD_GUI)
if(BUILD_GUI)

SET(FreeCADGuiPy_SRCS
FreeCADGuiPy.cpp
Expand Down Expand Up @@ -138,4 +138,4 @@ if(FREECAD_BUILD_GUI)
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif(WIN32)
endif(FREECAD_BUILD_GUI)
endif(BUILD_GUI)
4 changes: 2 additions & 2 deletions src/Mod/Assembly/CMakeLists.txt
@@ -1,8 +1,8 @@

add_subdirectory(App)
if(FREECAD_BUILD_GUI)
if(BUILD_GUI)
add_subdirectory(Gui)
endif(FREECAD_BUILD_GUI)
endif(BUILD_GUI)

INSTALL(
FILES
Expand Down

0 comments on commit ec21981

Please sign in to comment.