diff --git a/src/OpenMesh/Apps/CMakeLists.txt b/src/OpenMesh/Apps/CMakeLists.txt index 6ecb9211..2e17ab99 100644 --- a/src/OpenMesh/Apps/CMakeLists.txt +++ b/src/OpenMesh/Apps/CMakeLists.txt @@ -7,7 +7,7 @@ endif() if ( BUILD_APPS ) # Only build and fixbundle apps, when we are building OpenMesh standalone - if(${PROJECT_NAME} MATCHES "OpenMesh") + if(${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") if ( WIN32 AND OPENMESH_BUILD_SHARED ) add_definitions(-DOPENMESHDLL ) diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index 468cf99a..59e3fecf 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -25,7 +25,7 @@ vci_append_files (headers "*.hh" ${directories}) vci_append_files (sources "*.cc" ${directories}) # Disable Library installation when not building OpenMesh on its own but as part of another project! -if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh") +if ( NOT ${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") set(VCI_NO_LIBRARY_INSTALL true) endif() @@ -48,7 +48,7 @@ else () endif () # Add core as dependency before fixbundle -if ( (${PROJECT_NAME} MATCHES "OpenMesh") AND BUILD_APPS ) +if ( (${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") AND BUILD_APPS ) if ( WIN32 ) if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" ) @@ -65,7 +65,7 @@ if ( (${PROJECT_NAME} MATCHES "OpenMesh") AND BUILD_APPS ) endif() # if we build debug and release in the same dir, we want to install both! -if ( ${PROJECT_NAME} MATCHES "OpenMesh") +if ( ${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") if ( WIN32 ) FILE(GLOB files_install_libs "${CMAKE_BINARY_DIR}/Build/lib/*.lib" ) FILE(GLOB files_install_dlls "${CMAKE_BINARY_DIR}/Build/*.dll" ) @@ -101,7 +101,7 @@ endif() # Only install if the project name matches OpenMesh. -if (NOT APPLE AND ${PROJECT_NAME} MATCHES "OpenMesh") +if (NOT APPLE AND ${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") # Install Header Files) install(DIRECTORY . diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index cb0defad..8265af19 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -27,7 +27,7 @@ IF(WIN32 AND NOT MINGW) ENDIF(WIN32 AND NOT MINGW) # Disable Library installation when not building OpenMesh on its own but as part of another project! -if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh") +if ( NOT ${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") set(VCI_NO_LIBRARY_INSTALL true) endif() @@ -54,7 +54,7 @@ IF( NOT WIN32 ) target_link_libraries (OpenMeshToolsStatic OpenMeshCoreStatic) ENDIF(NOT WIN32) -if ( (${PROJECT_NAME} MATCHES "OpenMesh") AND BUILD_APPS ) +if ( (${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") AND BUILD_APPS ) if ( WIN32 ) if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" ) @@ -97,7 +97,7 @@ endif() # Only install if the project name matches OpenMesh. -if (NOT APPLE AND ${PROJECT_NAME} MATCHES "OpenMesh") +if (NOT APPLE AND ${CMAKE_PROJECT_NAME} MATCHES "OpenMesh") # Install Header Files install(DIRECTORY .